Skip to content

Commit

Permalink
simplify flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ivellios committed May 25, 2024
1 parent f7e36a7 commit 251e97e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
username: ${{ secrets.USERNAME }}
script: |
cp -a ${{ secrets.DEPLOY_DIR }} ${{ secrets.DEPLOY_DIR }}.bak-`date +"%s"`
rm -rf ${{ secrets.DEPLOY_DIR }}/*
- name: Sending files to production
uses: appleboy/[email protected]
Expand All @@ -57,15 +58,4 @@ jobs:
key: ${{ secrets.KEY }}
username: ${{ secrets.USERNAME }}
source: "*"
target: ${{ secrets.TEMP_DEPLOY_DIR }}

- name: Promoting build to production
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
key: ${{ secrets.KEY }}
username: ${{ secrets.USERNAME }}
script: |
rm -rf ${{ secrets.DEPLOY_DIR }}/*
cp -frp ${{ secrets.TEMP_DEPLOY_DIR }}/build/* ${{ secrets.DEPLOY_DIR }}/
rm -rf ${{ secrets.TEMP_DEPLOY_DIR }}/build
target: ${{ secrets.DEPLOY_DIR }}

0 comments on commit 251e97e

Please sign in to comment.