File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 runs-on : ubuntu-latest
1212 if : github.ref == 'refs/heads/master'
1313 steps :
14- - name : Checkout current branch
15- uses : actions/checkout@master
1614 - name : Connect by ssh and run new build
1715 uses : appleboy/ssh-action@master
1816 with :
2119 passphrase : ${{ secrets.SSH_PRIVATE_KEY_PASSPHRASE }}
2220 key : ${{ secrets.SSH_PRIVATE_KEY }}
2321 script : |
24- cd /home/deploy/applications/ideal_world_cup
22+ cd /home/deploy/applications/letscode
2523 git fetch --all
2624 git reset --hard origin/master
27- export $(egrep -v '^#' .env.production | xargs)
28- setuserid
29- docker-compose -f docker-compose.prod.yml up -d
25+ docker-compose -f docker-compose.yml up -d
26+ - name : Notify telegram group about a successful deployment
27+ if : ${{ success() }}
28+ uses : appleboy/telegram-action@master
29+ with :
30+ to : ${{ secrets.TELEGRAM_GROUP_ID }}
31+ token : ${{ secrets.TELEGRAM_BOT_TOKEN }}
32+ format : HTML
33+ message : |
34+ 💻 LetsCode.io: <a href="https://github.com/letscode-io/letscode.io/commit/${{ github.sha }}">Deployment #${{github.run_id}}</a>
35+ ✅ Deployment has been finished successfully
36+ - name : Notify telegram group about a failed deployment
37+ if : ${{ failure() }}
38+ uses : appleboy/telegram-action@master
39+ with :
40+ to : ${{ secrets.TELEGRAM_GROUP_ID }}
41+ token : ${{ secrets.TELEGRAM_BOT_TOKEN }}
42+ format : HTML
43+ message : |
44+ 💻 LetsCode.io: <a href="https://github.com/letscode-io/letscode.io/commit/${{ github.sha }}">Deployment #${{github.run_id}}</a>
45+ 💩 Deployment has been failed
You can’t perform that action at this time.
0 commit comments