Skip to content

Add GitHub Actions workflow for PR preview deployments#701

Merged
adamkudrna merged 1 commit intomasterfrom
claude/plan-branch-deployments-GLRiC
Mar 27, 2026
Merged

Add GitHub Actions workflow for PR preview deployments#701
adamkudrna merged 1 commit intomasterfrom
claude/plan-branch-deployments-GLRiC

Conversation

@adamkudrna
Copy link
Copy Markdown
Member

Summary

This PR adds a new GitHub Actions workflow that automatically builds and deploys preview versions of the documentation for pull requests.

Key Changes

  • Added .github/workflows/deploy-preview.yml workflow that:
    • Triggers on pull request events (opened, synchronize, reopened, closed)
    • Builds Node.js assets using npm run build
    • Installs and runs MkDocs Material to generate documentation
    • Deploys previews to the gh-pages branch under pr-preview/ directory using the pr-preview-action
    • Automatically cleans up preview deployments when PRs are closed
    • Uses concurrency controls to cancel in-progress builds for the same PR

Implementation Details

  • Skips build steps when PR is closed (only runs cleanup)
  • Caches MkDocs Material dependencies using a weekly cache key
  • Uses Node.js LTS and Python 3.x
  • Requires contents: write and pull-requests: write permissions
  • Runs on ubuntu-24.04

https://claude.ai/code/session_01KZiK5msUrKzwfwbddbxz3u

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 21, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://react-ui-org.github.io/react-ui/pr-preview/pr-701/

Built to branch gh-pages at 2026-03-23 15:23 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-project-automation github-project-automation bot moved this to 💡Ideas in The Board Mar 21, 2026
@adamkudrna adamkudrna moved this from 💡Ideas to 👀 In review in The Board Mar 21, 2026
@adamkudrna adamkudrna marked this pull request as ready for review March 21, 2026 20:53
@adamkudrna adamkudrna force-pushed the claude/plan-branch-deployments-GLRiC branch from b7d4baf to 4289ec9 Compare March 21, 2026 20:59
@adamkudrna adamkudrna temporarily deployed to pr-preview/pr-701 March 21, 2026 21:16 — with GitHub Actions Inactive
@adamkudrna adamkudrna temporarily deployed to pr-preview/pr-701 March 21, 2026 21:37 — with GitHub Actions Inactive
@adamkudrna adamkudrna force-pushed the claude/plan-branch-deployments-GLRiC branch from e2fe109 to 729cff0 Compare March 21, 2026 21:53
@adamkudrna adamkudrna temporarily deployed to pr-preview/pr-701 March 21, 2026 21:53 — with GitHub Actions Inactive
@adamkudrna
Copy link
Copy Markdown
Member Author

I added paths to ignore so branches like this are no longer needlessly deployed.

Builds and deploys a static site preview for each pull request using
rossjrw/pr-preview-action, hosted on the gh-pages branch under
pr-preview/pr-N/. Each preview is linked to a GitHub Deployment so the
PR interface shows a direct "View deployment" link; deployments are set
to inactive and their GitHub Environment is deleted when the PR is
closed, preventing stale entries from accumulating in the repository's
Environments list.

https://claude.ai/code/session_01KZiK5msUrKzwfwbddbxz3u
@adamkudrna adamkudrna force-pushed the claude/plan-branch-deployments-GLRiC branch from 3218510 to 726e62f Compare March 27, 2026 18:28
@adamkudrna adamkudrna merged commit d91fcce into master Mar 27, 2026
11 checks passed
@adamkudrna adamkudrna deleted the claude/plan-branch-deployments-GLRiC branch March 27, 2026 18:38
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in The Board Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants