.env
DEPLOY_ENABLE=true
DEPLOY_GITHUB_SECRET=
php artisan deploy:make-token
.deploy.yml
in root your source folder.Example:
github-deploy:
commands:
- git pull
- composer install --no-dev
- php artisan migrate --force
To add a webhook to an existing repository, navigate to the GitHub repository page and go to "Settings" > "Webhooks". Click on "Add webhook".
https://yourdomain.com/webhook/deploy/github/{action}/{token}
{action}: Action define in your file .deploy.yml
, example above, the action will be github-deploy
{token}: Your token created above
DEPLOY_GITHUB_SECRET
in .env
Example:
Webhook Url:
https://yourdomain.com/webhook/deploy/github/{action}/{token}?theme=default
In file .deploy.yml
github-deploy:
commands:
- cd themes/{theme}
- git pull