Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjar-x authored Jan 18, 2024
1 parent f6de3c7 commit 86cea59
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,36 @@ 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: Deploy to Server
uses: easingthemes/ssh-deploy@main
- name: Set to production
uses: appleboy/ssh-[email protected]
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i --delete"
SOURCE: "build/"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.TARGET }}
EXCLUDE: "/node_modules/"
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
mv /var/www/cyberswap/build/* /var/www/cyberswap/
rm -rf /var/www/cyberswap/build

0 comments on commit 86cea59

Please sign in to comment.