-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (39 loc) · 1.07 KB
/
deploy.yml
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
41
42
43
44
45
name: SSH Server Deploy
on:
push:
branches: json-server
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: build
run: |
npm i pnpm -g
pnpm i
pnpm run gen:sw
pnpm run build:index
cp ./dist/html/index.html ./dist/html/404.html
- name: deploy to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GIT_HUB_TOKEN }}
publish_dir: ./dist/html
publish_branch: gh-pages
# - name: SSH Server Deploy
# uses: kostya-ten/ssh-server-deploy@v4
# with:
# host: ${{ secrets.SSH_HOST }}
# port: 22
# username: ${{ secrets.SSH_USER }}
# password: ${{ secrets.SSH_PASSWORD }}
# scp_source: ./dist/*
# scp_target: /var/www/yszm/
# after_script: |
# whoami