Skip to content

Commit

Permalink
Deploy to HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjar-x authored Jan 18, 2024
1 parent 86cea59 commit 1b8f6d8
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,12 @@ jobs:
run: |
npm install
echo "Dependencies installed successfully"
- name: npm run build
run: |
npm run build
echo "Build completed successfully"
- name: Set to production directory
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
rm -rf /var/www/cyberswap/*

- name: Deploy to cyberswap
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
source: "./build/*"
target: "/var/www/cyberswap/"
continue-on-error: true
- name: Set to production
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
mv /var/www/cyberswap/build/* /var/www/cyberswap/
rm -rf /var/www/cyberswap/build
- name: Deploy to Hosting
run: |
scp -r -o StrictHostKeyChecking=no -i ${{ secrets.SSH_PRIVATE_KEY }} ./build/* ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:${{ secrets.TARGET }}

0 comments on commit 1b8f6d8

Please sign in to comment.