-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.19 KB
/
Copy pathdeploy.yml
File metadata and controls
40 lines (40 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: deploy
on: workflow_dispatch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v3
- name: use node.js
uses: actions/setup-node@v3
with:
node-version: "22.x"
cache: "npm"
- run: npm ci
- run: npm run build
- name: deploy to server
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
cd domains/imjustgradient.dev/public_nodejs/website
rm -rf ./*
- name: Copy files via SSH
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
source: "dist/gradient-generator"
target: "domains/imjustgradient.dev/public_nodejs/website/"
- name: restart server
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
devil www restart imjustgradient.dev