Search by

imamhossain / github-updater

imamhossain-bd

Automated GitHub pull and Artisan commands for Laravel

Package info

github.com/imamhossain-bd/Github-updater

pkg:composer/imamhossain/github-updater

Statistics

Installs: 52

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.4.4 2026-08-29 17:53 UTC

This package is auto-updated.

Last update: 2026-08-29 23:54:28 UTC


README

Deploy your Laravel app with one click — pull latest code from GitHub, install packages, run migrations, and clear caches, all automatically. Requires login to use.

Installation

composer require imamhossain/github-updater

Setup

Publish the config file:

php artisan vendor:publish --provider="ImamHossain\GithubUpdater\GithubUpdaterServiceProvider" --tag=config

Add these to your .env:

GITHUB_UPDATER_BRANCH=main
GITHUB_TOKEN=your_github_token
GITHUB_REPO=your-username/your-repo-name
GITHUB_UPDATER_PHP=/usr/bin/php
GITHUB_UPDATER_COMPOSER=/path/to/composer.phar
GITHUB_UPDATER_RUN_SEEDERS=false

GitHub Token: GitHub → Settings → Developer settings → Personal access tokens (classic) → Generate new token → select repo scope.

PHP Path: On shared hosting, make sure GITHUB_UPDATER_PHP points to the CLI version of PHP, not CGI. Check with:

find / -path "*/bin/php" -type f 2>/dev/null

Test each path with /path/to/php -i | grep "Server API" — pick the one that says Command Line Interface.

Usage

Log in to your app, then visit: https://yourdomain.com/github-pull

You'll see a live console showing each step as it runs. If you're not logged in, you'll get an "Access Denied" message.

What it does

  1. Pulls latest code from GitHub
  2. Runs composer install
  3. Runs migrations
  4. Runs seeders (if GITHUB_UPDATER_RUN_SEEDERS=true)
  5. Clears and rebuilds cache
  6. Restarts queue

Requirements

  • PHP >= 8.1
  • Laravel 9, 10, 11, or 12
  • Git installed on the server

License

MIT