Skip to content

Commit 371c63b

Browse files
committed
ci: harden Fern devnotes publishing
1 parent 5b3c963 commit 371c63b

4 files changed

Lines changed: 18 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
contents: write
168168
with:
169169
use_cache: ${{ github.event_name == 'workflow_dispatch' && inputs.use_cache || false }}
170-
checkout_ref: ${{ needs.resolve-release.outputs.prepare_release_docs == '1' && needs.resolve-release.outputs.source_ref || '' }}
170+
checkout_ref: ${{ needs.resolve-release.outputs.prepare_release_docs == '1' && needs.resolve-release.outputs.source_ref || needs.resolve-release.outputs.release_tag }}
171171
secrets: inherit
172172

173173
publish:

.github/workflows/docs-preview.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ jobs:
5555
- name: Build docs
5656
run: .venv/bin/mkdocs build
5757

58+
- name: Verify published Fern archive exists
59+
run: |
60+
if ! git ls-remote --exit-code --heads origin "$FERN_PUBLISHED_BRANCH" >/dev/null 2>&1; then
61+
echo "::error::$FERN_PUBLISHED_BRANCH does not exist. Publish a Fern release snapshot first."
62+
exit 1
63+
fi
64+
5865
- name: Checkout published Fern archive
5966
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
6067
with:

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ on:
44
push:
55
branches: [main]
66
paths:
7-
- "fern/assets/devnotes/**"
7+
- "fern/assets/**"
88
- "fern/components/Authors.tsx"
99
- "fern/components/BlogCard.tsx"
10+
- "fern/components/MetricsTable.tsx"
11+
- "fern/components/TrajectoryViewer.tsx"
1012
- "fern/components/devnotes/**"
1113
- "fern/styles/authors.css"
1214
- "fern/styles/blog-card.css"
15+
- "fern/styles/metrics-table.css"
16+
- "fern/styles/trajectory-viewer.css"
1317
- "fern/versions/latest.yml"
1418
- "fern/versions/latest/pages/devnotes/**"
1519
workflow_dispatch:

fern/scripts/fern-published-branch.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@
3030
"site",
3131
}
3232
FERN_DEVNOTE_SUPPORT_PATHS = [
33-
"fern/assets/devnotes",
33+
"fern/assets",
3434
"fern/components/Authors.tsx",
3535
"fern/components/BlogCard.tsx",
36+
"fern/components/MetricsTable.tsx",
37+
"fern/components/TrajectoryViewer.tsx",
3638
"fern/components/devnotes",
3739
"fern/styles/authors.css",
3840
"fern/styles/blog-card.css",
41+
"fern/styles/metrics-table.css",
42+
"fern/styles/trajectory-viewer.css",
3943
]
4044

4145

0 commit comments

Comments
 (0)