Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(surge-deploy): try to limit API rate limit errors #740

Merged
merged 6 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/_reusable_surge-deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ jobs:
id: surge-preview-tools
with:
surge-token: ${{ secrets.SURGE_TOKEN_DOC }}
github-token: ${{ secrets.BONITA_CI_PAT }} # Avoid rate limiting produced with default GITHUB_TOKEN
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: The afc163/surge-preview action also do some GH API calls (it does the exact same call as the surge-preview-tools action)
So, it should probably use the PAT.
Notice that this will change the author of PR comment created/updated by the action from github-actions bot to bonita-ci bot. This has no impact for contributors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems better with PAT after some tests on bonita-doc pr

- name: Publish preview
uses: afc163/surge-preview@v1
if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true'
with:
surge_token: ${{ secrets.SURGE_TOKEN_DOC }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.BONITA_CI_PAT }} # Avoid rate limiting produced with default GITHUB_TOKEN
dist: build/site
failOnError: true
teardown: true
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/surge-deploy-pr-preview-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ jobs:
id: surge-preview-tools
with:
surge-token: ${{ secrets.SURGE_TOKEN_DOC }}
github-token: ${{ secrets.BONITA_CI_PAT }} # Avoid rate limiting produced with default GITHUB_TOKEN
- name: Publish preview
uses: afc163/surge-preview@v1
if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true'
with:
surge_token: ${{ secrets.SURGE_TOKEN_DOC }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.BONITA_CI_PAT }} # Avoid rate limiting produced with default GITHUB_TOKEN
dist: build/site
failOnError: true
teardown: true
Expand Down
Loading