Keep PAT if you want to deploy to another repo
This commit is contained in:
parent
d91b233e1c
commit
5eecabb9a5
|
@ -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
1
dist/index.js
generated
vendored
|
@ -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`);
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue
Block a user