Skip to content

Commit 85739c2

Browse files
authored
Clarify how to store a custom token as secret
1 parent 7e4f61f commit 85739c2

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,17 @@ the `with` parameter.
232232
Default: The current repository that the pull request was made in.
233233

234234
- `token`: The token to use for the preview deployment. The default value is
235-
fine for most purposes, but if you want to deploy the preview to a different
236-
repository (see `deploy-repository` above), you will need to create a
237-
[Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
238-
with permission to access it.
239-
240-
Default: `${{ secrets.GITHUB_TOKEN }}`, which gives the action permission to
241-
deploy to the current repository. To customize it, use e.g.
242-
`token: ${{ secrets.PREVIEW_TOKEN }}` not just `token: PREVIEW_TOKEN`.
235+
fine for deployments to the current repository, but if you want to deploy
236+
the preview to a different repository (see `deploy-repository` above), you
237+
will need to create a [Personal Access
238+
Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
239+
with permission to access it, and [store it as a
240+
secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions)
241+
in your repository. E.g. you might name that secret 'PREVIEW_TOKEN' and
242+
use it with `token: ${{ secrets.PREVIEW_TOKEN }}`.
243+
244+
Default: `${{ github.token }}`, which gives the action permission to
245+
deploy to the current repository.
243246

244247
- **(Advanced)** `action`: Determines what this action will do when it is
245248
executed. Supported values: `deploy`, `remove`, `none`, `auto`.

0 commit comments

Comments
 (0)