Skip to content

Commit

Permalink
ci(deploy): add "set -e" to make script exit if a command is failed
Browse files Browse the repository at this point in the history
  • Loading branch information
tfkhdyt committed Jul 6, 2024
1 parent 8549162 commit 7daa43b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: deploy yukitanya
on:
on:
push:
branches:
- master
Expand All @@ -15,8 +15,10 @@ jobs:
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
set -e
cd /root/yukitanya
git pull
npx pnpm i
npm run build
pm2 restart ecosystem.config.js || pm2 start ecosystem.config.js
pm2 restart ecosystem.config.js || pm2 start ecosystem.config.js

0 comments on commit 7daa43b

Please sign in to comment.