Skip to content

Commit c845c08

Browse files
milldrclaude
andcommitted
fix(ci): use GITHUB_TOKEN for release downloads to avoid PAT rate limits
The REPO_ACCESS_TOKEN PAT was hitting GitHub API rate limits, causing release asset downloads to fail with HTTP 403 errors. The GITHUB_TOKEN has separate per-workflow rate limits that won't be exhausted by other workflows. - Add github_token input to build-website action - Use github_token for release downloads when provided, fall back to repo_access_token - Pass GITHUB_TOKEN in preview and release workflows Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6adba43 commit c845c08

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/actions/build-website/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ inputs:
1818
repo_access_token:
1919
description: "GitHub Token used to access private repos"
2020
required: true
21+
github_token:
22+
description: "GitHub Token for downloading release assets (uses separate rate limits from PAT)"
23+
required: false
24+
default: ""
2125
skip_library_download:
2226
description: "Skip downloading library docs from release (use when docs are already present)"
2327
default: "false"
@@ -63,11 +67,12 @@ runs:
6367
make init
6468
6569
# Download pre-built library docs from the most recent release (draft or published) that has the asset
70+
# Uses github_token if provided (separate rate limits), falls back to repo_access_token
6671
- name: "Download Pre-built Library Docs"
6772
if: ${{ inputs.skip_library_download != 'true' }}
6873
shell: bash
6974
env:
70-
GH_TOKEN: ${{ inputs.repo_access_token }}
75+
GH_TOKEN: ${{ inputs.github_token != '' && inputs.github_token || inputs.repo_access_token }}
7176
run: |
7277
DOWNLOADED=false
7378

.github/workflows/website-deploy-preview.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
iam_role_arn: ${{ env.IAM_ROLE_ARN }}
6666
iam_role_session_name: ${{ env.IAM_ROLE_SESSION_NAME }}
6767
repo_access_token: ${{ secrets.REPO_ACCESS_TOKEN }}
68+
github_token: ${{ secrets.GITHUB_TOKEN }}
6869

6970
- name: Copy Website to S3 Bucket PR Folder
7071
run: |

.github/workflows/website-deploy-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
google_tag_manager: ${{ env.GOOGLE_TAG_MANAGER }}
6767
google_site_verification_id: ${{ env.GOOGLE_SITE_VERIFICATION_ID }}
6868
repo_access_token: ${{ secrets.REPO_ACCESS_TOKEN }}
69+
github_token: ${{ secrets.GITHUB_TOKEN }}
6970
skip_library_download: "true"
7071

7172
# "assets/refarch/handoffs/*" are handled by cloudposse-corp/demos

0 commit comments

Comments
 (0)