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 : push
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+ scp /home/runner/work/gradient-generator/gradient-generator/dist/gradient-generator/ ${{ secrets.USERNAME }}@${{ secrets.HOST }}:domains/imjustgradient.dev/public_nodejs/website/
26+ # - name: Copy files via SSH
27+ # uses: appleboy/scp-action@v1
28+ # with:
29+ # host: ${{ secrets.HOST }}
30+ # username: ${{ secrets.USERNAME }}
31+ # key: ${{ secrets.SSH_KEY }}
32+ # source: "dist/gradient-generator/"
33+ # target: "domains/imjustgradient.dev/public_nodejs/website/"
You can’t perform that action at this time.
0 commit comments