-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.39 KB
/
publish-docs.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
name: Publish Docs to the Wiki
on:
push:
branches: ['main']
workflow_dispatch:
concurrency:
group: publish-wiki
cancel-in-progress: true
permissions:
contents: write
jobs:
install-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache node modules
id: cache
uses: actions/cache@v3
with:
path: node_modules
key: cache-node-modules-${{ hashFiles('package-lock.json') }}
- uses: actions/setup-node@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
node-version-file: '.nvmrc'
- name: NPM install
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
publish:
runs-on: ubuntu-latest
needs: install-deps
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: cache-node-modules-${{ hashFiles('package-lock.json') }}
- name: Build Docs
run: scripts/build-docs.sh
- name: Upload Docs to Wiki
uses: Andrew-Chen-Wang/github-wiki-action@v4
with:
path: 'docs'