Skip to content

Commit

Permalink
Update deploy2prod.yml
Browse files Browse the repository at this point in the history
Adding backup feature
  • Loading branch information
martinheppner authored Dec 26, 2023
1 parent 25da756 commit 5f19ed3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/deploy2prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ jobs:
run: npm install
- name: Run build task
run: npm run build
- name: executing remote ssh command to backup app
uses: appleboy/[email protected]
with:
host: ${{ secrets.PROD_REMOTE_HOST }}
username: ${{ secrets.PROD_REMOTE_USER }}
key: ${{ secrets.PROD_SSH_PRIVATE_KEY }}
port: ${{ secrets.PROD_REMOTE_PORT }}
script: |
rm -r /root/suchseite/app-backup/
cp -r /root/suchseite/app/ /root/suchseite/app-backup/
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
with:
Expand Down

0 comments on commit 5f19ed3

Please sign in to comment.