Skip to content

Commit 88313c4

Browse files
committed
Fix CI deploy
1 parent 241a9cc commit 88313c4

1 file changed

Lines changed: 22 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ jobs:
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:
@@ -21,9 +19,27 @@ jobs:
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

0 commit comments

Comments
 (0)