-
Notifications
You must be signed in to change notification settings - Fork 165
docs: prepare Fern docs workflow #622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
andreatgretel
wants to merge
13
commits into
main
Choose a base branch
from
andreatgretel/chore/fern-generated-artifacts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a903d67
docs: prepare fern generated artifacts
andreatgretel feaec93
docs: update fern migration artifacts
andreatgretel 47658a7
docs: leave colab notebooks unchanged
andreatgretel 696dfa1
docs: add VLM recipe cards to Fern
andreatgretel 4b2bb3c
docs: trim Dev Notes sidebar
andreatgretel 3d8ff53
docs: collapse older Dev Notes in sidebar
andreatgretel 861e6b6
docs: add Fern publishing workflows
andreatgretel 93c0cdf
docs: gate Fern publishing on check
andreatgretel db65a7c
docs: restrict hosted previews for fork PRs
andreatgretel 1abe2a8
docs: clean Fern preview URL
andreatgretel e723fb2
docs: cancel stale preview runs
andreatgretel 4e2b0b2
docs: clarify devnotes notebook reuse
andreatgretel 29c6fdd
docs: clean older versions route
andreatgretel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: Build Fern docs | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| use_cache: | ||
| description: "Use cached notebooks for unchanged sources" | ||
| type: boolean | ||
| default: true | ||
| release: | ||
| types: | ||
| - published | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| build-notebooks: | ||
| uses: ./.github/workflows/build-notebooks.yml | ||
| permissions: | ||
| actions: read | ||
| contents: write | ||
| with: | ||
| use_cache: ${{ github.event_name == 'workflow_dispatch' && inputs.use_cache || false }} | ||
| secrets: inherit | ||
|
|
||
| publish: | ||
| needs: build-notebooks | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | ||
| with: | ||
| version: "0.9.5" | ||
|
|
||
| - name: Set up Python | ||
| run: uv python install 3.13 | ||
|
|
||
| - name: Install docs dependencies | ||
| run: uv sync --python 3.13 --all-packages --group docs --group notebooks | ||
|
|
||
| - name: Download executed notebooks | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: notebooks | ||
| path: docs/notebooks | ||
|
|
||
| - name: Check Fern docs | ||
| run: make check-fern-docs | ||
|
|
||
| - name: Publish Fern docs | ||
| run: | | ||
| if [ -z "$FERN_TOKEN" ]; then | ||
| echo "::error::DOCS_FERN_TOKEN secret is required to publish Fern docs." | ||
| exit 1 | ||
| fi | ||
|
|
||
| cd fern | ||
| npx -y fern-api@$(jq -r .version fern.config.json) generate --docs --no-prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy Fern previewsits beforeDeploy to Cloudflare Pageswith nocontinue-on-errorguard. GitHub Actions skips all subsequent steps when any step fails (the implicitsuccess()condition applies even to steps with explicit event-basedif:guards). A Fern API error, timeout, or token issue will therefore prevent the MkDocs site from being deployed and prevent the PR comment from being posted β silently dropping the MkDocs preview URL from the PR.Adding
continue-on-error: trueto the Fern step lets the Cloudflare deploy and comment steps always run for same-repo PRs regardless of Fern's outcome.Prompt To Fix With AI