Skip to content

Commit 456e141

Browse files
Accept the Pages project name from a secret or a repository variable
1 parent e098409 commit 456e141

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ name: Docs
99
# - CLOUDFLARE_API_TOKEN secret (API token with the "Cloudflare Pages: Edit"
1010
# permission)
1111
# - CLOUDFLARE_ACCOUNT_ID secret
12-
# - CLOUDFLARE_PAGES_PROJECT_TSDOC repository variable (the Pages project name)
12+
# - CLOUDFLARE_PAGES_PROJECT_TSDOC secret or repository variable (the Pages
13+
# project name)
1314
#
1415
# When any of them is missing (for example on a fork), publishing skips
1516
# cleanly and the job still succeeds so releases are not blocked.
@@ -60,7 +61,7 @@ jobs:
6061
env:
6162
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
6263
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
63-
PAGES_PROJECT: ${{ vars.CLOUDFLARE_PAGES_PROJECT_TSDOC }}
64+
PAGES_PROJECT: ${{ secrets.CLOUDFLARE_PAGES_PROJECT_TSDOC || vars.CLOUDFLARE_PAGES_PROJECT_TSDOC }}
6465
run: |
6566
set -euo pipefail
6667
if [ -z "${CLOUDFLARE_API_TOKEN:-}" ] || [ -z "${CLOUDFLARE_ACCOUNT_ID:-}" ] || [ -z "${PAGES_PROJECT:-}" ]; then

0 commit comments

Comments
 (0)