Repository navigation
69 lines (59 loc) · 1.83 KB
/
Copy pathdocumentation-build.yml
File metadata and controls
69 lines (59 loc) · 1.83 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
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
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: documentation build
jobs:
documentationbuild:
name: generated CLI docs build
runs-on: ubuntu-latest
steps:
- name: Checkout CLI
uses: actions/checkout@v7.0.1
- name: Install latest rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v6.1.0
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v6.1.0
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v6.1.0
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Generate CLI markdown
run: make gen-md
- name: Checkout documentation
uses: actions/checkout@v7.0.1
with:
repository: kittycad/documentation
path: docs
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v7.1.0
with:
node-version: '22'
- name: Install dependencies
run: npm install
working-directory: docs
- name: Replace generated CLI docs
run: |
rm -rf docs/content/pages/docs/cli/manual/kittycad*.md
rm -rf docs/content/pages/docs/cli/manual/zoo*.md
mv -f generated_docs/md/zoo*.md docs/content/pages/docs/cli/manual/
- name: Run build
run: npm run build
working-directory: docs