-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (58 loc) · 1.81 KB
/
doc.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
59
60
61
62
63
64
65
66
67
68
69
70
name: github pages doc
env:
NODE_OPTIONS: --max-old-space-size=6144
on:
push:
branches:
- master
paths:
- 'docs/**'
- 'packages/**/*.md'
workflow_dispatch:
permissions:
contents: write
# pages: write
# id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/[email protected]
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org/'
cache: 'pnpm'
# We use week in the turbo cache key to keep the cache from infinitely growing
- name: Get cache expires mark
id: get-week
run: echo "WEEK=$(date +%U)" >> $GITHUB_OUTPUT
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v3
with:
path: .turbo
key: turbo-${{ github.job }}-${{ runner.os }}-node${{ matrix.node-version }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.job }}-${{ runner.os }}-node${{ matrix.node-version }}-
turbo-${{ github.job }}-${{ runner.os }}-node${{ matrix.node-version }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-
- name: Install dependencies
run: pnpm i
- run: pnpm docs:build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages # default: gh-pages
publish_dir: ./docs-dist