From 7daa43b199b4e06c26eab92513af7556114194ec Mon Sep 17 00:00:00 2001 From: Taufik Hidayat Date: Sat, 6 Jul 2024 16:08:53 +0700 Subject: [PATCH] ci(deploy): add "set -e" to make script exit if a command is failed --- .github/workflows/deploy.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index dd525f6..ff00e12 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,5 +1,5 @@ name: deploy yukitanya -on: +on: push: branches: - master @@ -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 \ No newline at end of file + pm2 restart ecosystem.config.js || pm2 start ecosystem.config.js +