From 5eecabb9a56aa67d1d4d548e47a6cf418f5db8a2 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Mon, 4 May 2020 02:02:18 +0200 Subject: [PATCH] Keep PAT if you want to deploy to another repo --- README.md | 1 + dist/index.js | 1 - src/main.ts | 3 --- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 39db7b0..3acc31a 100644 --- a/README.md +++ b/README.md @@ -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? diff --git a/dist/index.js b/dist/index.js index 080d3d6..c24b3e2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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`); diff --git a/src/main.ts b/src/main.ts index 4ca7dc9..61a8801 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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());