actions-marketplace-validations/Deploy PR Preview

Deploy a pull request preview to GitHub Pages, similar to Vercel and Netlify.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Maintainedlast commit Jan 20, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: actions-marketplace-validations/rossjrw_pr-preview-action@6f3a89d9ff1b752c6e781d91eacd27d9952188b0 # no releases — HEAD as of 2026-07-10

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

namedescriptionrequireddefault
tokenThe token to use for the deployment. Default is GITHUB_TOKEN in the current repository. If you need more permissions for things such as deploying to another repository, you can add a Personal Access Token (PAT). no${{ github.token }}
preview-branchBranch on which the previews will be deployed.nogh-pages
umbrella-dirPath to the directory containing all previews.nopr-preview
pages-base-urlURL of the repo's GitHub Pages site.no""
pages-base-pathPath that GitHub Pages is served from.no""
source-dirDirectory containing files to deploy.no.
pr-numberThe PR number to use for the preview path. Defaults to the PR number from the GitHub event context. Override this for testing or when not triggered by a pull_request event. no""
deploy-repositoryThe GitHub repository to deploy the preview to. This should be formatted like `<org name>/<repo name>`, e.g. `rossjrw/pr-preview-action`. Defaults to the current repository. You will need to add a Personal Access Token (PAT) in the `token` input in order to allow the action running in one repository to make changes to another repository. no${{ github.repository }}
wait-for-pages-deploymentWhether to wait for GitHub Pages deployment before continuing, e.g. to ensure the preview URL is actually accessible when the sticky comment is posted. nofalse
commentWhether to leave a sticky comment on the calling PR at the end of the workflow.notrue
qr-codeURL to a QR code provider to generate a QR code for the preview URL in the comment. Preview URL will be appended to the string. Or, set to "false" to disable QR code generation.nohttps://qr.rossjrw.com/?color.dark=0d1117&url=
deploy-commit-messageThe commit message to use when adding/updating a preview.noDeploy preview for PR ${{ github.event.number }} 🛫
remove-commit-messageThe commit message to use when removing a preview.noRemove preview for PR ${{ github.event.number }} 🛬
git-config-nameThe git user.name to use for the deployment commit.no
git-config-emailThe git user.email to use for the deployment commit.no
custom-urlDeprecated, use `pages-base-url` instead.no""
actionDetermines what this action will do when it is executed. Supported values: `deploy`, `remove`, `auto` (default). If set to `deploy`, will attempt to deploy the preview and overwrite any existing preview in that location. If set to `remove`, will attempt to remove the preview in that location. If set to `auto`, the action will try to determine whether to deploy or remove the preview. It will deploy the preview on `pull_request.types.synchronize` and `.opened` events, and remove it on `pull_request.types.closed` events. It will not do anything for all other events. `auto` is the default value. noauto
namedescription
deployment-actionResolved value of the 'action' input parameter (deploy, remove, none).
pages-base-urlWhat this Action thinks the base URL of the GitHub Pages site is.
preview-url-pathPath to the preview from the Pages base URL.
preview-urlFull URL to the preview (https://[pages-base-url]/[preview-url-path]/).
action-versionThe version of this Action when it was run.
action-start-timestampThe Unix timestamp that the action started.
action-start-timeThe time that the action started in a readable format (UTC, depending on runner).
deployed-commit-shaThe commit SHA that was deployed to the preview branch.
deployment-urlDeprecated, use `preview-url` instead.