koizuka/PR Preview Deploy
Deploy PR previews to GitHub Pages gh-pages branch or cleanup on PR close
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jun 29, 2026
- License
- MIT
Pinned Snippet
uses: koizuka/pr-preview-action@b03654e20a3e1a9c84309ac9a864e6ba3c4d078b # v1.1.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| action | Action to perform: deploy or cleanup | yes | deploy |
| source-dir | Path to built artifacts directory (required for deploy) | no | dist |
| base-url | GitHub Pages base URL (e.g., https://owner.github.io/repo) | yes | — |
| token | GitHub token for authentication (needs contents:write and pull-requests:write) | yes | ${{ github.token }} |
| pr-number | Pull request number (auto-detected from context if not provided) | no | "" |
| preview-path-prefix | Path prefix for preview directories (default: pr) | no | pr |
| comment-enabled | Whether to post/update PR comments (default: true) | no | true |
| wait-for-deployment | Wait for GitHub Pages deployment to complete (default: true) | no | true |
| max-wait-time | Maximum time to wait for deployment in seconds (default: 300) | no | 300 |
| git-user-name | Git user name for commits | no | github-actions[bot] |
| git-user-email | Git user email for commits | no | github-actions[bot]@users.noreply.github.com |
Outputs
| name | description |
|---|---|
| preview-url | The deployed preview URL |
| has-changes | Whether there were changes to deploy |