Skip to content

Commit

Permalink
Update main-pipeline.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdksh authored Dec 26, 2023
1 parent d835142 commit 14d72f0
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/main-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
test:
Expand Down Expand Up @@ -75,12 +76,17 @@ jobs:
deploy:
needs: publish
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Production deploy
uses: garygrossgarten/github-action[email protected]
- name: SSH and Redeploy
uses: appleboy/ssh-action@v1.0.0
with:
command: cd notification-center && 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;
host: ${{ secrets.PRODUCTION_HOST }}
username: ${{ secrets.PRODUCTION_USERNAME }}
privateKey: ${{ secrets.PRODUCTION_PRIVATE_KEY}}
host: ${{ secrets.PROD_HOST_ALL }}
username: ${{ secrets.PROD_USERNAME_ALL }}
key: ${{ secrets.PROD_PRIVATE_KEY_ALL }}
port: ${{ secrets.SSH_PORT }}
script: |
cd giveth-all
docker compose stop notification-center
docker compose pull notification-center
docker compose up -d notification-center
docker image prune -a --force

0 comments on commit 14d72f0

Please sign in to comment.