File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ name : deploy
2+ on :
3+ push :
4+ tags :
5+ - " v**"
6+ # branches:
7+ # - 'main'
8+ jobs :
9+ docker :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+ - name : Run Web
15+ run : |
16+ node -v
17+ npm install -g pnpm
18+ pnpm i
19+ npm run build
20+ - name : Setup SSH agent
21+ uses : webfactory/ssh-agent@v0.5.3
22+ with :
23+ ssh-private-key : ${{ secrets.SSH_PRIVATE_KEY }}
24+ - name : Add SSH key to known hosts
25+ run : |
26+ ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
27+ - name : Package
28+ run : |
29+ tar -zczf build.tar.gz build
30+ - name : Deploy
31+ run : |
32+ scp -r build.tar.gz ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_PATH }}
33+ ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "tar -zxvf ${{secrets.SSH_PATH}}/build.tar.gz -C ${{secrets.SSH_PATH}}"
You can’t perform that action at this time.
0 commit comments