Skip to content

ci: standardize docs workflow#4

Closed
stefan-jansen wants to merge 1 commit into
mainfrom
ci/standardize-docs-workflow
Closed

ci: standardize docs workflow#4
stefan-jansen wants to merge 1 commit into
mainfrom
ci/standardize-docs-workflow

Conversation

@stefan-jansen

Copy link
Copy Markdown
Contributor

Summary

  • standardize the library docs deployment workflow on the shared website handoff pattern
  • pin astral-sh/setup-uv to the official v8.1.0 commit from Astral's setup-uv documentation
  • build docs with uv run mkdocs build and deploy site/ to website/static/docs/engineer/ when the deploy key is present

Notes

  • preserves the existing website-side docs rendering and navbar injection contract
  • keeps the deploy target and URL structure unchanged

Copilot AI review requested due to automatic review settings April 29, 2026 16:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Standardizes the documentation build/deploy GitHub Actions workflow to match the shared “website handoff” pattern, including pinning setup-uv and conditionally deploying generated MkDocs output to the website repository.

Changes:

  • Pins astral-sh/setup-uv to a specific commit (v8.1.0) for the docs workflow.
  • Builds docs via uv run mkdocs build and conditionally deploys site/ when a deploy key is present.
  • Routes deploy key through a job-level env var and uses it to gate the deploy step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- name: Build docs
run: uv run mkdocs build --strict
run: uv run mkdocs build

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing --strict from the MkDocs build step will allow broken links / config warnings to pass silently and can result in publishing a partially broken site. If the intent is to relax strictness, it would help to document why; otherwise consider keeping strict mode enabled for CI docs builds.

Suggested change
run: uv run mkdocs build
run: uv run mkdocs build --strict

Copilot uses AI. Check for mistakes.
Comment on lines +19 to 21
env:
DOCS_DEPLOY_KEY: ${{ secrets.DOCS_DEPLOY_KEY }}
steps:

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DOCS_DEPLOY_KEY is being placed into the job-level env, which makes the secret available to every step (including third-party actions) and increases the blast radius if any step logs/exports env vars. Prefer keeping the deploy key scoped to the deploy step only.

Copilot uses AI. Check for mistakes.
Comment on lines +41 to 45
if: ${{ env.DOCS_DEPLOY_KEY != '' }}
uses: cpina/github-action-push-to-another-repository@v1.7.2
env:
SSH_DEPLOY_KEY: ${{ secrets.DOCS_DEPLOY_KEY }}
SSH_DEPLOY_KEY: ${{ env.DOCS_DEPLOY_KEY }}
with:

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deploy gating and key injection can be done directly off the secrets context (in the if: and SSH_DEPLOY_KEY assignment) rather than routing through env.DOCS_DEPLOY_KEY. This avoids depending on a derived env value and keeps the secret out of the general environment.

Copilot uses AI. Check for mistakes.
@stefan-jansen

Copy link
Copy Markdown
Contributor Author

Superseded by the later GitHub Actions/Dependabot maintenance PR that has already been merged to main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants