Skip to content

Add docs preview deployment and PR comment link to CI#322

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/add-github-actions-for-docs
Draft

Add docs preview deployment and PR comment link to CI#322
Copilot wants to merge 2 commits intomasterfrom
copilot/add-github-actions-for-docs

Conversation

Copy link

Copilot AI commented Mar 19, 2026

The docs workflow built documentation on every PR but provided no way to view the output. This adds PR preview deployments with an automatic bot comment linking to the live preview.

Changes to .github/workflows/docs.yml

  • PR event types: Added types: [opened, synchronize, reopened, closed] — triggers cleanup when PRs close
  • Permissions: Added contents: write (push to gh-pages) and pull-requests: write (post PR comments)
  • Skip builds on close: All install/build steps gated with if: github.event.action != 'closed' — only cleanup runs on PR close
  • Artifact upload: Built HTML uploaded as docs-{sha} artifact after each successful build, downloadable from the Actions run
  • Deploy PR Preview (rossjrw/pr-preview-action@v1): Deploys built HTML to gh-pages/pr-preview/pr-{number}/ and posts a bot comment on the PR with the preview URL
  • Remove PR Preview (rossjrw/pr-preview-action@v1): Cleans up the gh-pages subdirectory when the PR is closed/merged

The existing master-branch deployment via peaceiris/actions-gh-pages is unchanged. Preview URLs follow the pattern:

https://neurotechx.github.io/EEG-ExPy/pr-preview/pr-{number}/

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: JohnGriffiths <397826+JohnGriffiths@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Actions for viewing built docs on CI Add docs preview deployment and PR comment link to CI Mar 19, 2026
Copilot AI requested a review from JohnGriffiths March 19, 2026 14:13
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