Repository navigation
87 lines (76 loc) · 3 KB
/
Copy pathdocs-site.yml
File metadata and controls
87 lines (76 loc) · 3 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
82
83
84
85
86
87
# Builds the CodeGraph website (https://firlab.app/codegraph/) from a pull request's pages against
# firlab's public main, so a dead link, an unknown component, a page missing in one language, a
# missing screenshot, a banned word, a malformed home page or a link that leaves /codegraph/ fails
# before the merge rather than in publish-site.yml after it. Nothing is published and no secret is
# read, so a fork's pull request runs it the same way. Advisory: not part of CI Success.
# docs/site/README.md describes the whole path.
name: Docs site
on:
pull_request:
paths:
- "docs/site/**"
- "!docs/site/README.md"
- "!docs/site/tools/**"
- "docs/cli.md"
- "docs/mcp.md"
- "docs/ui.md"
- "docs/languages.md"
- "docs/godot.md"
- "docs/troubleshooting.md"
- "docs/architecture.md"
- "docs/data-model.md"
- "docs/equivalence.md"
- "docs/grammar-manifest.md"
- "docs/embedded-extraction.md"
- "docs/benchmark.md"
- "docs/benchmark-results.md"
- ".github/workflows/docs-site.yml"
- ".github/workflows/publish-site.yml"
concurrency:
group: docs-site-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: Docs site · build
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout codegraph-rust
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: codegraph-rust
persist-credentials: false
- name: Checkout firlab
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: sunerpy/firlab
path: firlab
persist-credentials: false
# The site installs on its own (its package.json pins pnpm); pnpm before setup-node so the
# pnpm cache resolves.
- name: Install pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
package_json_file: firlab/codegraph/package.json
- name: Setup Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: firlab/.node-version
cache: pnpm
cache-dependency-path: firlab/codegraph/pnpm-lock.yaml
- name: Sync the pages
run: ./firlab/codegraph/scripts/sync-codegraph-docs.sh "$GITHUB_WORKSPACE/codegraph-rust"
- name: Install the site's dependencies
working-directory: firlab/codegraph
run: pnpm install --frozen-lockfile
- name: Build
working-directory: firlab/codegraph
run: pnpm build
# The same check firlab's deploy runs before it publishes the site: both languages were
# emitted, every in-site link resolves, and every link, asset and sitemap entry stays under
# /codegraph/.
- name: Check both languages and the /codegraph/ base
working-directory: firlab/codegraph
run: ./scripts/check-dist.sh dist