Last active
February 17, 2018 20:50
-
-
Save ssx/93bb311a3dfa963f8af7 to your computer and use it in GitHub Desktop.
Forge Deploy Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /home/forge/example.com | |
git pull origin master | |
composer install | |
php artisan migrate --force | |
chmod -R 777 app/storage | |
HOST=$(hostname) | |
MESSAGE=$(git show -s --format=%B) | |
SHA=$(git rev-parse --verify HEAD) | |
SHA="==== New Deploy ==== \n\n *Server*: $HOST\n*Site*: example.com\n*Deployment Commit:* https://server/username/project/commit/$SHA\n*Message:*\n\n$MESSAGE" | |
curl -X POST --data-urlencode 'payload={"channel": "#deploy", "username": "Laravel Forge", "text": "'"$SHA"'", "icon_emoji": ":shipit:"}' https://hooks.slack.com/services/link/with/token |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment