Skip to content

Update GitHub Actions workflows to replace pr-preview-action#136

Merged
yoren merged 1 commit intomainfrom
feature/replace-pr-preview-step
Sep 18, 2025
Merged

Update GitHub Actions workflows to replace pr-preview-action#136
yoren merged 1 commit intomainfrom
feature/replace-pr-preview-step

Conversation

@yoren
Copy link
Copy Markdown
Collaborator

@yoren yoren commented Sep 18, 2025

We had to replace the pr-preview-action with another action that supporting our use case. The author doesn't support forked PRs for security reasons: rossjrw/pr-preview-action#6 So we shall also keep in mind with that.

This pull request updates the PR preview deployment and cleanup workflows to use the more robust github-pages-deploy-action instead of the previous pr-preview-action. It also improves visibility for contributors by posting sticky comments with preview links and timestamps on pull requests.

Deployment workflow improvements:

  • Switched from rossjrw/pr-preview-action to JamesIves/github-pages-deploy-action@v4 for deploying PR previews, allowing more flexible folder targeting and improved reliability. (.github/workflows/pr-deploy-preview.yml)
  • Added a step to post a sticky comment on the PR with the preview link and UTC timestamp, improving contributor awareness and traceability. (.github/workflows/pr-deploy-preview.yml)

Cleanup workflow improvements:

  • Updated permissions to allow writing pull request comments, enabling sticky comment functionality. (.github/workflows/pr-preview-cleanup.yml)
  • Replaced preview removal logic with github-pages-deploy-action@v4, deploying an empty folder to effectively remove the preview, and added a sticky comment to notify contributors of the removal with a timestamp. (.github/workflows/pr-preview-cleanup.yml)

…hub-pages-deploy-action, enhance PR preview deployment and cleanup processes, and add sticky comments with timestamps.
@yoren yoren self-assigned this Sep 18, 2025
@yoren yoren merged commit afa4c1a into main Sep 18, 2025
1 check passed
@yoren yoren deleted the feature/replace-pr-preview-step branch September 18, 2025 12:35
@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Action v1
Preview removed because the pull request was closed.
2025-09-18 12:35 UTC

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.

1 participant