Skip to content

Commit

Permalink
Clarify how to store a custom token as secret
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjrw authored Nov 2, 2023
1 parent 7e4f61f commit 85739c2
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,17 @@ the `with` parameter.
Default: The current repository that the pull request was made in.

- `token`: The token to use for the preview deployment. The default value is
fine for most purposes, but if you want to deploy the preview to a different
repository (see `deploy-repository` above), you will need to create 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.

Default: `${{ secrets.GITHUB_TOKEN }}`, which gives the action permission to
deploy to the current repository. To customize it, use e.g.
`token: ${{ secrets.PREVIEW_TOKEN }}` not just `token: PREVIEW_TOKEN`.
fine for deployments to the current repository, but if you want to deploy
the preview to a different repository (see `deploy-repository` above), you
will need to create 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 }}`.

Default: `${{ github.token }}`, which gives the action permission to
deploy to the current repository.

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

0 comments on commit 85739c2

Please sign in to comment.