koizuka/PR Preview Deploy

Deploy PR previews to GitHub Pages gh-pages branch or cleanup on PR close

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jun 29, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: koizuka/pr-preview-action@b03654e20a3e1a9c84309ac9a864e6ba3c4d078b # v1.1.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
actionAction to perform: deploy or cleanupyesdeploy
source-dirPath to built artifacts directory (required for deploy)nodist
base-urlGitHub Pages base URL (e.g., https://owner.github.io/repo)yes
tokenGitHub token for authentication (needs contents:write and pull-requests:write)yes${{ github.token }}
pr-numberPull request number (auto-detected from context if not provided)no""
preview-path-prefixPath prefix for preview directories (default: pr)nopr
comment-enabledWhether to post/update PR comments (default: true)notrue
wait-for-deploymentWait for GitHub Pages deployment to complete (default: true)notrue
max-wait-timeMaximum time to wait for deployment in seconds (default: 300)no300
git-user-nameGit user name for commitsnogithub-actions[bot]
git-user-emailGit user email for commitsnogithub-actions[bot]@users.noreply.github.com
namedescription
preview-urlThe deployed preview URL
has-changesWhether there were changes to deploy