-
-
Notifications
You must be signed in to change notification settings - Fork 44
44 lines (39 loc) · 1.26 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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Deploy page
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- '**.gif'
- '**.cmd'
- 'LICENSE'
- '.gitignore'
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
- '**.gif'
- '**.cmd'
- 'LICENSE'
- '.gitignore'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm install
- run: npx update-browserslist-db@latest
- run: CI=false && npm run build
- name: Deploy 🚀 # 部署
id: 'deploy'
uses: JamesIves/github-pages-deploy-action@v4.3.3 # 部署到github的静态页,会将打包后的文件推送至下面填写的分支,可以直接新开一个分支用来放打包后的文件
with:
BRANCH: gh-pages # 编译文件分支
FOLDER: build # 编译文件的文件夹