-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (39 loc) · 1.25 KB
/
master.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
46
47
# deploy on vercel and cloud server
name: deploy
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14.x"
- name: install dependeces
run: |
npm i yarn
npm i vercel
yarn install
- name: build site
run: |
yarn build
mv ./build ./docs/yiri-mirai
- name: vercel deploy
run: |
vercel link "$PWD/docs/yiri-mirai" --confirm --token=${{ secrets.VERCEL_TOKEN }}
vercel deploy "$PWD/docs/yiri-mirai" --prod --token=${{ secrets.VERCEL_TOKEN }}
# - name: cloud server deploy
# run: |
# echo ${{ secrets.SCP_PEM_B64 }} > V.b64
# cat V.b64 | base64 -d > V.pem
# # ssh-keyscan -H wybxc.cc >> ~/.ssh/known_hosts
# chmod 600 V.pem
# echo "Start Scp!"
# scp -i V.pem -r -o "StrictHostKeyChecking no" ./docs/yiri-mirai/ wybxc@wybxc.cc:~/yiri-mirai-document/