Skip to content

Add PR preview deploys for non-source branches#7

Closed
ladavid wants to merge 1 commit into
sourcefrom
binf-100-pr-preview-deploys
Closed

Add PR preview deploys for non-source branches#7
ladavid wants to merge 1 commit into
sourcefrom
binf-100-pr-preview-deploys

Conversation

@ladavid
Copy link
Copy Markdown

@ladavid ladavid commented May 12, 2026

Summary

Adds a second GitHub Actions workflow (.github/workflows/preview.yml) that builds the mkdocs site for any non-source branch and publishes it to main/previews/<branch>/, so reviewers can see a rendered preview before merge.

  • Push to any branch other than source / main / gh-pages triggers a build and deploy to previews/<branch-slug>/ (slashes in branch names flatten to -).
  • PR opened/synchronized against source posts a sticky comment with the preview URL and the head commit SHA; subsequent pushes update the same comment in place.
  • PR closed/merged removes the preview subfolder from main and updates the sticky comment.
  • keep_files: true ensures previews never clobber the live site under main/.
  • concurrency group cancels older in-flight builds for the same branch, so the push and pull_request triggers don't double up.

README.md is new (none existed) and documents the branch model, local preview, the preview URL pattern, and the reminder to keep pip install lines in sync across ci.yml and preview.yml when adding plugins.

Files changed

  • .github/workflows/preview.yml (new)
  • README.md (new)

Test plan

  • Merge PR or push another commit to binf-100-pr-preview-deploys; confirm the preview workflow runs and publishes to https://lad-lab.github.io/previews/binf-100-pr-preview-deploys/ within ~3 min.
  • Open this PR; confirm a sticky comment with the preview URL appears.
  • Push a follow-up commit; confirm the same comment updates (no new comment).
  • Confirm https://lad-lab.github.io (live site) renders unchanged.
  • Confirm mermaid block, material nav, and git-revision plugin date all render in the preview.
  • On PR close (after merge or manual close), confirm previews/binf-100-pr-preview-deploys/ is removed from main and the sticky comment shows "removed".

Closes BINF-100

Adds .github/workflows/preview.yml that builds mkdocs and publishes to
main/previews/<branch>/ for any non-source branch push or PR against
source. Comments the preview URL on PRs (sticky, updated on each push)
and removes the subfolder when the PR is closed.

README.md documents the preview URL pattern and reminds editors to keep
the pip install line in sync across ci.yml and preview.yml.

Closes BINF-100
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

Preview for binf-100-pr-preview-deploys removed.

@dksuperdock dksuperdock deleted the binf-100-pr-preview-deploys branch May 12, 2026 20:38
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