Merge pull request #13 from Baiqiang/feat-daily #164
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: | |
workflow_call: | |
secrets: | |
SSH_PRIVATE_KEY: | |
required: true | |
SSH_HOST: | |
required: true | |
SSH_USER: | |
required: true | |
DEPLOY_PATH: | |
required: true | |
push: | |
branches: [master] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USER }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: | | |
cd ${{ secrets.DEPLOY_PATH }} | |
git pull | |
yarn | |
yarn build | |
pm2 start ecosystem.config.cjs |