-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.14 KB
/
github-action.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
48
49
50
51
52
name: Deploy blog
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.16.0"
- name: Install and Build
run: |
yarn install
yarn docs:build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: blog
FOLDER: src/.vuepress/dist
deploy-server:
runs-on: ubuntu-latest
needs: build-and-deploy
steps:
- name: Checkout Blog
uses: actions/checkout@v3
with:
ref: blog
fetch-depth: 0
- name: Upload to Deploy Server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
source: './*'
target: '/www/wwwroot/yaien'
overwrite: true