-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (33 loc) · 883 Bytes
/
main.yml
File metadata and controls
36 lines (33 loc) · 883 Bytes
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
name: Deploy GitHub Pages
# 触发条件:在 push 到 master 分支后
on:
push:
branches:
- main
# 任务
jobs:
build-and-deploy:
# 服务器环境:最新版 Ubuntu
runs-on: ubuntu-latest
steps:
# 拉取代码
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
# npm install
- name: npm install
run: cd apijson-doc && npm install
# vuepress
- name: vuepress
run: cd apijson-doc && npm install -D vuepress
# build 生成静态文件
- name: build
run: cd apijson-doc && npm run build
# 部署到 GitHub Pages
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: apijson-doc/docs