forked from llamastack/llama-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.8 KB
/
docs-build.yml
File metadata and controls
64 lines (52 loc) · 1.8 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
name: Documentation Build
run-name: Build and validate documentation
on:
schedule:
- cron: '0 0 * * *' # Daily at 12 AM UTC
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}
cancel-in-progress: true
jobs:
docs-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [22]
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'docs/package-lock.json'
- name: Cache node_modules
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
id: cache-node-modules
with:
path: docs/node_modules
key: ${{ runner.os }}-node-${{ matrix.node-version }}-modules-${{ hashFiles('docs/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-modules-
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
working-directory: docs
run: npm ci
- name: Generate API documentation
working-directory: docs
run: npm run gen-api-docs all
- name: Build documentation
working-directory: docs
run: npm run build
- name: Upload build artifacts
if: success()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: docs-build
path: docs/build/
retention-days: 7