Skip to content

ci(docs): add per-PR documentation previews - #11

Merged
vks-team merged 2 commits into
mainfrom
ci/docs-pr-preview
Jun 15, 2026
Merged

vks-team merged 2 commits into
mainfrom
ci/docs-pr-preview

Conversation

@vks-team

Copy link
Copy Markdown
Contributor

What

Adds .github/workflows/docs-preview.yml so every PR that touches docs gets a live preview.

On pull_request (when docs/**, mkdocs.yml, Pipfile, or this workflow change), it:

  1. Builds the MkDocs site (mkdocs build)
  2. Publishes it to gh-pages/pr-preview/pr-<N>/ via rossjrw/pr-preview-action
  3. Posts the preview link as a PR comment, and removes the preview when the PR is closed

Preview URL format: https://vngcloud.github.io/vngcloud-load-balancer-controller/pr-preview/pr-<N>/

Notes

  • Coexists with mike: mike only manages the version folders + versions.json; the action only manages the pr-preview/ umbrella, so they don't clash on gh-pages.
  • Uses the pull_request event, so previews only deploy for same-repo PRs — fork PRs get a read-only token and skip the deploy step.
  • Requires GitHub Pages to be enabled on the gh-pages branch (already done).
  • The mike version selector may appear empty inside a preview (its versions.json isn't in the preview subtree) — cosmetic only.

🤖 Generated with Claude Code

Build the MkDocs site on pull requests and publish it to
gh-pages/pr-preview/pr-<N>/ via rossjrw/pr-preview-action, posting the
preview link as a PR comment and cleaning it up when the PR closes.

Coexists with mike (separate gh-pages subtrees). Only deploys for
same-repo PRs since fork PRs get a read-only token.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-15 09:09 UTC

pr-preview-action (even v1.8.1) still pins Node 20 actions internally.
Set FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 to silence the deprecation warning;
no-op once Node 24 is the runner default.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vks-team vks-team self-assigned this Jun 15, 2026
@vks-team
vks-team merged commit 5867a48 into main Jun 15, 2026
6 checks passed
@vks-team
vks-team deleted the ci/docs-pr-preview branch June 15, 2026 09:09
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