Skip to content

Commit c9b8a9c

Browse files
authored
Update main-pipeline.yml
1 parent bbf542e commit c9b8a9c

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/main-pipeline.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
types: [closed]
66
branches:
77
- main
8+
workflow_dispatch:
89

910
jobs:
1011
publish:
@@ -34,10 +35,16 @@ jobs:
3435
needs: publish
3536
runs-on: ubuntu-latest
3637
steps:
37-
- name: Production deploy
38-
uses: garygrossgarten/github-action[email protected]
38+
- name: SSH and Redeploy
39+
uses: appleboy/ssh-action@v1.0.0
3940
with:
40-
command: cd giveconomy-notification-service && git checkout main && git pull && docker-compose -f docker-compose-production.yml pull && docker-compose -f docker-compose-production.yml down && docker-compose -f docker-compose-production.yml up -d && docker image prune -a --force;
41-
host: ${{ secrets.PRODUCTION_HOST }}
42-
username: ${{ secrets.PRODUCTION_USERNAME }}
43-
privateKey: ${{ secrets.PRODUCTION_PRIVATE_KEY}}
41+
host: ${{ secrets.PROD_HOST_ALL }}
42+
username: ${{ secrets.PROD_USERNAME_ALL }}
43+
key: ${{ secrets.PROD_PRIVATE_KEY_ALL }}
44+
port: ${{ secrets.SSH_PORT }}
45+
script: |
46+
cd giveth-all
47+
docker-compose stop givEconomy-notification-service
48+
docker-compose pull givEconomy-notification-service
49+
docker-compose up -d givEconomy-notification-service
50+
docker image prune -a --force

0 commit comments

Comments
 (0)