-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.06 KB
/
gh-pages.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
# action 的名称
name: github
# 触发条件:在 push 到 master 分支后
on:
push:
branches:
- master
# 任务
jobs:
build-and-deploy:
# 服务器环境:最新版 Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: "16.5.0"
# 拉取代码
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
# 生成静态文件
- name: yarn
run: yarn
- name: Build
run: yarn install && yarn build
# 部署到 GitHub Pages
- name: Deploy
# 使用别人写好的一个 action
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
# 这里的 ACCESS_TOKEN 名字需要和下文中的相对应
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# 打包后的文件部署到哪个分支上
BRANCH: gh-pages
# 打包后的文件在哪里
FOLDER: antdpro-demo