You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`source-dir` | When creating or updating a preview, the path to the directory that contains the files to deploy. E.g. if your project builds to `./dist/` you would put `./dist/` (or `dist`, etc.). <br> Equivalent to [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) 'folder' setting. <br><br> Default: `.`(repository root)
99
+
`deploy-repository` | The repository to deploy the preview to. <br> __Note:__ The `token` parameter must also be set if changing this from the default. <br><br> Default: The pull request's target repository.
100
+
`preview-branch` | Branch to save previews to. This should be the same branch that your GitHub Pages site is deployed from. <br><br> Default: `gh-pages`
101
+
`umbrella-dir` | Path to the directory to place previews in. <br> The umbrella directory is used to namespace previews from your main branch's deployment on GitHub Pages. <br><br> Default: `pr-preview`
102
+
`pages-base-url` | Base URL to use when providing a link to the preview site. <br><br> Default: The pull request's target repository's default GitHub Pages URL (e.g. `rossjrw.github.io/pr-preview-action/`)
103
+
`pages-base-path` | Path that GitHub Pages is being served from, as configured in your repository settings, e.g. `docs/`. When generating the preview URL path, this is removed from the beginning of the file path. <br><br> Default: `.`(repository root)
104
+
`comment` <br> (boolean) | Whether to leave a [sticky comment](https://github.com/marocchino/sticky-pull-request-comment) on the PR after the preview is built.<br> The comment may be added before the preview finishes deploying. <br><br> Default: `true`
105
+
`token` | Authentication token for the preview deployment. <br> The default value works for non-fork pull requests to the same repository. For anything else, you will need a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with permission to access it, and [store it as a secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) in your repository. E.g. you might name that secret 'PREVIEW_TOKEN' and use it with `token: ${{ secrets.PREVIEW_TOKEN }}`. <br><br> Default: `${{ github.token }}`, which gives the action permission to deploy to the current repository.
106
+
`action` <br> (enum) | Determines what this action will do when it is executed. Supported values: <br><br> <ul><li>`deploy` - create and deploy the preview, overwriting any existing preview in that location.</li><li>`remove` - remove the preview.</li><li>`auto` - determine whether to deploy or remove the preview based on [the emitted event](https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request). If the event is `pull_request`, it will deploy the preview when the event type is `opened`, `reopened` and `synchronize`, and remove it on `closed` events. Does not do anything for other events or event types, even if you explicitly instruct the workflow to run on them.</li><li>`none` and all other values: does not do anything.</li></ul> Default: `auto`
for the `pull_request` event. It only comes with `opened`, `reopened`, and
105
-
`synchronize`by default — but this Action assumes by default that
106
-
the preview should be removed during the `closed` event, which it only sees
107
-
if you explicitly add it to the workflow.
110
+
Several output values are provided to use after this Action in your workflow. To use them, give this Action's step an `id` and reference the value with `${{ steps.<id>.outputs.<name> }}`, e.g.:
108
111
109
-
#### Grant Actions permission to read and write to the repository
- `preview-branch`: Branch on which the previews will be deployed. This
207
-
should be the same branch that your GitHub Pages site is deployed from.
208
-
209
-
Default: `gh-pages`
210
-
211
-
- `umbrella-dir`: Name of the directory containing all previews. All
212
-
previews will be created inside this directory.
213
-
214
-
The umbrella directory is used to namespace previews from your main
215
-
branch's deployment on GitHub Pages.
216
-
217
-
Set to `.` to place preview directories into the root directory, but be
218
-
aware that this may cause your main branch's deployment to interfere with
219
-
your preview deployments (and vice-versa!)
220
-
221
-
Default: `pr-preview`
222
-
223
-
- `pages-base-path`: Path that GitHub Pages is being served from, as configured in your repository settings. When generating the preview URL, this is removed from the beginning of the path.
224
-
225
-
Default: ``(repository root)
226
-
227
-
- `custom-url`: Base URL to use when providing a link to the preview site.
228
-
229
-
Default: Will attempt to calculate the repository's GitHub Pages URL
230
-
(e.g. "rossjrw.github.io").
231
-
232
-
- `deploy-repository`: The repository to deploy the preview to.
233
-
234
-
If this value is changed from the default, the `token` parameter must also
235
-
be set (see below).
236
-
237
-
Default: The current repository that the pull request was made in.
238
-
239
-
- `token`: The token to use for the preview deployment. The default value is
240
-
fine for deployments to the current repository, but if you want to deploy
241
-
the preview to a different repository (see `deploy-repository` above), you
(MIT), used by this Action to leave a sticky comment on pull requests
361
+
- [shlinkio/deploy-preview-action](https://github.com/shlinkio/deploy-preview-action) (MIT), prior art that informed the direction of this Action
362
+
- [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) (MIT), used by this Action to deploy previews
363
+
- [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) (MIT), used by this Action to leave a sticky comment on pull requests
364
+
- [Everyone who has contributed](https://github.com/rossjrw/pr-preview-action/graphs/contributors) to this Action
0 commit comments