Skip to content

Commit 1f17391

Browse files
committed
chore: add deploy workflow
1 parent a1a79ed commit 1f17391

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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/"

0 commit comments

Comments
 (0)