Add PR preview deploys for non-source branches#7
Closed
ladavid wants to merge 1 commit into
Closed
Conversation
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
|
Preview for |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a second GitHub Actions workflow (
.github/workflows/preview.yml) that builds the mkdocs site for any non-sourcebranch and publishes it tomain/previews/<branch>/, so reviewers can see a rendered preview before merge.source/main/gh-pagestriggers a build and deploy topreviews/<branch-slug>/(slashes in branch names flatten to-).sourceposts a sticky comment with the preview URL and the head commit SHA; subsequent pushes update the same comment in place.mainand updates the sticky comment.keep_files: trueensures previews never clobber the live site undermain/.concurrencygroup cancels older in-flight builds for the same branch, so the push and pull_request triggers don't double up.README.mdis new (none existed) and documents the branch model, local preview, the preview URL pattern, and the reminder to keeppip installlines in sync acrossci.ymlandpreview.ymlwhen adding plugins.Files changed
.github/workflows/preview.yml(new)README.md(new)Test plan
binf-100-pr-preview-deploys; confirm the preview workflow runs and publishes tohttps://lad-lab.github.io/previews/binf-100-pr-preview-deploys/within ~3 min.https://lad-lab.github.io(live site) renders unchanged.previews/binf-100-pr-preview-deploys/is removed frommainand the sticky comment shows "removed".Closes BINF-100