Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kangood committed May 24, 2024
1 parent eac390e commit 404cbfa
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,18 @@ jobs:
run: |
echo $(which pnpm)
echo $(which pm2)
echo $USER
echo $PATH
- name: Install pm2
run: |
npm install -g pm2
- name: Add directory to PATH
run: |
echo "/home/runner/setup-pnpm/node_modules/.bin/pnpm" >> $GITHUB_PATH
echo "/opt/hostedtoolcache/node/18.20.2/x64/bin/pm2" >> $GITHUB_PATH
- name: Check pnpm and pm2 installation
run: |
echo $(which pnpm)
Expand All @@ -46,10 +53,9 @@ jobs:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
bash -l {0}
script: |
cd /home/project/blog-web
git pull origin master
pnpm install --production
/opt/hostedtoolcache/node/18.18.0/x64/bin/pm2 restart blog-web
pm2 restart blog-web

0 comments on commit 404cbfa

Please sign in to comment.