style: 样式优化 #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{secrets.DEPLOY_HOST}} | |
username: ${{secrets.DEPLOY_USER}} | |
password: ${{secrets.DEPLOY_PASS_WORD}} | |
script: cd /www/blog-offical && git fetch && git reset --hard HEAD && git merge origin/main && rm -rf node_modules && pnpm install && npx prisma generate && pnpm build && pm2 stop all && pm2 delete blog && pm2 start --name blog npm -- run start |