-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (50 loc) · 1.72 KB
/
docs.pnpm.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
53
54
55
56
57
58
name: docs
on:
# 每当 push 到 main 分支时触发部署
push:
branches: [dev]
# 手动触发部署
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout this
# @see https://github.com/actions/checkout
uses: actions/checkout@v3
# with:
# ssh-key: ${{ secrets.ID_MOBILE_ROBOT_CORE }}
# submodules: true # Fetch private submodules
# - name: remove core docs
# run: rm -rf core/docs/core
- name: Contribute List
# @see https://github.com/marketplace/actions/contribute-list
uses: akhilmhdh/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
use_username: true
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Run install
# @see https://github.com/marketplace/actions/setup-pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
- recursive: true
args: [--no-frozen-lockfile, --strict-peer-dependencies]
- args: [--global, gulp, prettier, typescript]
- name: Deploy to GitHub Pages
# @see https://github.com/crazy-max/ghaction-github-pages
uses: crazy-max/ghaction-github-pages@v2
with:
# 部署到 docs 分支
target_branch: docs
# 部署目录为 VuePress 的默认输出目录
build_dir: docs/.vuepress/dist
env:
# @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}