Keep PAT if you want to deploy to another repo

This commit is contained in:
CrazyMax 2020-05-04 02:02:18 +02:00
parent d91b233e1c
commit 5eecabb9a5
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
3 changed files with 1 additions and 4 deletions

View File

@ -77,6 +77,7 @@ Following environment variables can be used as `step.env` keys
| Name | Description |
|----------------|---------------------------------------|
| `GITHUB_TOKEN` | [GITHUB_TOKEN](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) as provided by `secrets` |
| `GITHUB_PAT` | Use a [Personal Access Token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) if you want to deploy to another repo |
## How can I help?

1
dist/index.js generated vendored
View File

@ -1787,7 +1787,6 @@ function run() {
if (process.env['GITHUB_PAT']) {
core.info(`✅ Use GITHUB_PAT`);
remote_url = remote_url.concat(process.env['GITHUB_PAT'].trim());
core.warning('Personal Access Token is not required anymore to trigger a page build on a public repository (see https://github.com/crazy-max/ghaction-github-pages/issues/1)');
}
else if (process.env['GITHUB_TOKEN']) {
core.info(`✅ Use GITHUB_TOKEN`);

View File

@ -27,9 +27,6 @@ async function run() {
if (process.env['GITHUB_PAT']) {
core.info(`✅ Use GITHUB_PAT`);
remote_url = remote_url.concat(process.env['GITHUB_PAT'].trim());
core.warning(
'Personal Access Token is not required anymore to trigger a page build on a public repository (see https://github.com/crazy-max/ghaction-github-pages/issues/1)'
);
} else if (process.env['GITHUB_TOKEN']) {
core.info(`✅ Use GITHUB_TOKEN`);
remote_url = remote_url.concat('x-access-token:', process.env['GITHUB_TOKEN'].trim());