-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (36 loc) · 1.42 KB
/
deploy.yml
File metadata and controls
40 lines (36 loc) · 1.42 KB
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
name: Deploy to GitHub Pages
on:
push:
branches:
- main
# 如果您想进一步定义触发器、路径等,请查看 gh 操作文档
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
- name: Install dependencies
run: npm install --frozen-lockfile
- name: Build website
run: npm run build
# 部署到 GitHub Pages 的常用操作:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# 构建输出以发布到 `gh-pages` 分支:
publish_dir: ./build
# 以下几行将提交作者身份分配给官方
# 用于部署到 `gh-pages` 分支的 GH-Actions 机器人:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# 如果您未指定这两个字段,则默认使用 GH 操作机器人。
# 您可以将它们换成您自己的用户凭据。
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com