Repository navigation
81 lines (68 loc) · 2.01 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
81 lines (68 loc) · 2.01 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
70
71
72
73
74
75
76
77
78
79
80
81
name: Deploy BL UI docs
on:
push:
branches: [main]
paths:
- 'apps/docs/**'
- 'packages/**'
- 'registry/**'
- 'registry.json'
- 'tools/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'nx.json'
- 'tsconfig*.json'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10.15.0
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check the committed registry, tokens and variant docs are current
run: |
node tools/registry/build.mjs --check
node tools/tokens/build.mjs --check
node tools/tokens/check.mjs
node tools/docs/variants-md.mjs --check
# Also builds the shadcn registry into apps/docs/public/r (served at /ui/r/<item>.json) first.
- name: Build docs
run: pnpm nx build @brett_lamy/docs-app
- name: Check the entry CSS carries docstream's styles
run: grep -lq 'docs-command' apps/docs/dist/assets/index-*.css || { echo "docstream styles missing from the entry CSS"; exit 1; }
- name: Add SPA fallback
run: cp apps/docs/dist/index.html apps/docs/dist/404.html
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: apps/docs/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4