File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : deploy
2+ on : workflow_dispatch
3+ jobs :
4+ deploy :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - name : checkout repo
8+ uses : actions/checkout@v3
9+ - name : use node.js
10+ uses : actions/setup-node@v3
11+ with :
12+ node-version : " 22.x"
13+ cache : " npm"
14+ - run : npm ci
15+ - run : npm run build
16+ - name : deploy to server
17+ uses : appleboy/ssh-action@v1
18+ with :
19+ host : ${{ secrets.HOST }}
20+ username : ${{ secrets.USERNAME }}
21+ key : ${{ secrets.SSH_KEY }}
22+ script : |
23+ cd domains/imjustgradient.dev/public_nodejs/website
24+ rm -rf ./*
25+ - name : Copy files via SSH
26+ uses : appleboy/scp-action@v1
27+ with :
28+ host : ${{ secrets.HOST }}
29+ username : ${{ secrets.USERNAME }}
30+ key : ${{ secrets.SSH_KEY }}
31+ source : " dist/gradient-generator"
32+ target : " domains/imjustgradient.dev/public_nodejs/website/"
33+ - name : restart server
34+ uses : appleboy/ssh-action@v1
35+ with :
36+ host : ${{ secrets.HOST }}
37+ username : ${{ secrets.USERNAME }}
38+ key : ${{ secrets.SSH_KEY }}
39+ script : |
40+ devil www restart imjustgradient.dev
You can’t perform that action at this time.
0 commit comments