Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/pr-preview-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Cleanup PR previews

on:
pull_request:
types:
- closed

concurrency: preview-${{ github.ref }}

jobs:
cleanup-preview:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
pages: write
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: true

- name: Remove preview
uses: rossjrw/pr-preview-action@ffa7509e91a3ec8dfc2e5536c4d5c1acdf7a6de9 # v1.8.1
with:
source-dir: website/doc_build
preview-branch: gh-pages
qr-code: true
wait-for-pages-deployment: true
9 changes: 8 additions & 1 deletion .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ on:
- opened
- reopened
- synchronize
- closed
paths:
- "website/**"
- ".github/actions/build-docs/action.yml"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include setup action changes in preview triggers

When a PR changes only .github/actions/setup-node-pnpm/action.yml, this path filter skips the preview workflow even though the docs build action invoked below delegates its toolchain setup to that composite action (.github/actions/build-docs/action.yml:12-14). That means changes to the Node/pnpm install path can merge without exercising the PR preview build they affect; add the setup action path (or the whole .github/actions/** subtree) to this trigger list.

Useful? React with 👍 / 👎.

- ".github/actions/setup-node-pnpm/action.yml"
- ".github/workflows/pr-preview.yml"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"

concurrency: preview-${{ github.ref }}

Expand Down
Loading