Skip to content

Commit fedd606

Browse files
committed
fix(fern): pin frozen version content via git archive at publish time
Frozen versions pointed at ../../docs/ (the live docs directory), serving current content for all versions. Switch to the git archive pattern used by NVSentinel: at publish time, extract docs from each version's git tag into fern/versions/vX.Y.Z-content/ directories. - v0.3.0.yml paths now reference v0.3.0-content/ (populated at CI time) - Publish workflow: fetch-tags + git archive step extracts docs per tag - .gitignore excludes *-content/ dirs from the repo Signed-off-by: Pete MacKinnon <mackinnon.pd@gmail.com>
1 parent c3d261b commit fedd606

3 files changed

Lines changed: 33 additions & 17 deletions

File tree

.github/workflows/publish-fern-docs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ jobs:
4242
steps:
4343
- name: Checkout repository
4444
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
45+
with:
46+
fetch-tags: true
47+
48+
- name: Checkout frozen version content
49+
run: |
50+
for version_file in fern/versions/v*.yml; do
51+
version=$(basename "$version_file" .yml)
52+
if git rev-parse "$version" >/dev/null 2>&1; then
53+
mkdir -p "fern/versions/${version}-content"
54+
git archive "$version" -- docs/ | tar -x --strip-components=1 -C "fern/versions/${version}-content"
55+
echo "Extracted docs from $version"
56+
else
57+
echo "::warning::Tag $version not found — skipping content checkout"
58+
fi
59+
done
4560
4661
- name: Setup Node.js
4762
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0

fern/versions/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*-content/

fern/versions/v0.3.0.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,48 @@ navigation:
55
- section: Getting Started
66
contents:
77
- page: Overview
8-
path: ../../docs/overview.md
8+
path: v0.3.0-content/overview.md
99
- page: Install on Kubernetes
10-
path: ../../docs/get-started/quickstart-k8s.md
10+
path: v0.3.0-content/get-started/quickstart-k8s.md
1111
- page: Install on Slurm
12-
path: ../../docs/get-started/quickstart-slurm.md
12+
path: v0.3.0-content/get-started/quickstart-slurm.md
1313

1414
- section: Architecture
1515
contents:
1616
- page: Architecture
17-
path: ../../docs/architecture.md
17+
path: v0.3.0-content/architecture.md
1818
- page: Config and API
19-
path: ../../docs/api.md
19+
path: v0.3.0-content/api.md
2020

2121
- section: Providers
2222
contents:
2323
- page: AWS
24-
path: ../../docs/providers/aws.md
24+
path: v0.3.0-content/providers/aws.md
2525
- page: GCP
26-
path: ../../docs/providers/gcp.md
26+
path: v0.3.0-content/providers/gcp.md
2727
- page: OCI
28-
path: ../../docs/providers/oci.md
28+
path: v0.3.0-content/providers/oci.md
2929
- page: Nebius
30-
path: ../../docs/providers/nebius.md
30+
path: v0.3.0-content/providers/nebius.md
3131
- page: InfiniBand
32-
path: ../../docs/providers/infiniband.md
32+
path: v0.3.0-content/providers/infiniband.md
3333
- page: NetQ
34-
path: ../../docs/providers/netq.md
34+
path: v0.3.0-content/providers/netq.md
3535
- page: DRA
36-
path: ../../docs/providers/dra.md
36+
path: v0.3.0-content/providers/dra.md
3737
- page: Test
38-
path: ../../docs/providers/test.md
38+
path: v0.3.0-content/providers/test.md
3939

4040
- section: Engines
4141
contents:
4242
- page: SLURM
43-
path: ../../docs/engines/slurm.md
43+
path: v0.3.0-content/engines/slurm.md
4444
- page: Kubernetes
45-
path: ../../docs/engines/k8s.md
45+
path: v0.3.0-content/engines/k8s.md
4646
- page: Slinky
47-
path: ../../docs/engines/slinky.md
47+
path: v0.3.0-content/engines/slinky.md
4848

4949
- section: Reference
5050
contents:
5151
- page: Node Labels and Annotations
52-
path: ../../docs/reference/node-labels.md
52+
path: v0.3.0-content/reference/node-labels.md

0 commit comments

Comments
 (0)