Skip to content

Commit

Permalink
TO-DROP: investigate "secondary rate limit" problem
Browse files Browse the repository at this point in the history
In
https://github.com/git/git-scm.com/actions/runs/10818898105/job/30015545237#step:3:125466
as well as in
https://github.com/git/git-scm.com/actions/runs/10819147877/job/30016365271#step:3:125438
I hit the following snag:

	RequestError [HttpError]: You have exceeded a secondary rate
	limit. Please wait a few minutes before you try again. [...]

First of all, let's try to trigger this reliably, then work around it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Sep 11, 2024
1 parent 4bde2d0 commit 494aa4b
Showing 1 changed file with 3 additions and 95 deletions.
98 changes: 3 additions & 95 deletions .github/actions/deploy-to-github-pages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,92 +14,14 @@ inputs:
description: The GitHub token used to create an authenticated client
default: ${{ github.token }}
required: true
outputs:
url:
description: The URL to which the site was deployed
value: ${{ steps.deploy.outputs.page_url }}
runs:
using: "composite"
steps:
- name: push changes (if needed)
- name: Fake lychee run
shell: bash
run: |
test "$(git rev-parse HEAD)" = "$(git rev-parse refs/remotes/origin/${{ github.ref_name }})" ||
git push origin HEAD:${{ github.ref }}
- name: un-sparse worktree to prepare for deployment
shell: bash
run: git sparse-checkout disable

- name: setup GitHub Pages
id: pages
uses: actions/configure-pages@v5

- name: configure Hugo and Pagefind version
shell: bash
run: |
set -x &&
echo "HUGO_VERSION=$(sed -n 's/^ *hugo_version: *//p' <hugo.yml)" >>$GITHUB_ENV
echo "PAGEFIND_VERSION=$(sed -n 's/^ *pagefind_version: *//p' <hugo.yml)" >>$GITHUB_ENV
- name: install Hugo ${{ env.HUGO_VERSION }}
shell: bash
run: |
set -x &&
curl -Lo /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/hugo_extended_${HUGO_VERSION}_linux-amd64.deb &&
sudo dpkg -i /tmp/hugo.deb
- name: run Hugo to build the pages
env:
HUGO_RELATIVEURLS: false
shell: bash
run: hugo config && hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"

- name: run Pagefind ${{ env.PAGEFIND_VERSION }} to build the search index
shell: bash
run: npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public

- name: upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

- name: deploy
id: deploy
uses: actions/deploy-pages@v4

- name: construct `--remap` option for lychee
id: remap
shell: bash
run: |
base_url='${{ steps.pages.outputs.base_url }}'
echo "result=$(echo "$base_url" |
sed 's|^\(.*\)\(/git-scm\.com\)$|(\1)?\2(.*)|') file://$PWD/public\$2" \
>>$GITHUB_OUTPUT
- name: check for broken links
id: lychee
uses: lycheeverse/lychee-action@d4128702eae98bbc5ecf74df0165a8156c80920a # until an official version is out that includes https://github.com/lycheeverse/lychee/pull/1422
with:
lycheeVersion: nightly # until an official version includes https://github.com/lycheeverse/lychee/pull/1422
args: >-
--offline
--fallback-extensions html
--base '${{ steps.pages.outputs.base_url }}'
--remap '${{ steps.remap.outputs.result }}'
--exclude file:///path/to/repo.git/
--exclude file:///caminho/para/o/reposit%C3%B3rio.git/
--exclude file:///ruta/a/repositorio.git/
--exclude file:///sl%C3%B3%C3%B0/til/hirsla.git/
--exclude file:///Pfad/zum/Repo.git/
--exclude file:///chemin/du/d%C3%A9p%C3%B4t.git/
--exclude file:///srv/git/project.git
public/
output: lychee.md
jobSummary: true
fail: false
failIfEmpty: false # needed because its default overrides `fail = false`

echo 'lychee_exit_code=0' >>$GITHUB_ENV
echo 'O hai' >lychee.md
- name: ${{ env.lychee_exit_code != '0' && 'maybe close' || 'open or update' }} link checker issue
uses: actions/github-script@v7
with:
Expand Down Expand Up @@ -127,17 +49,3 @@ runs:
await github.rest.issues.update({ ...req, state: 'closed' })
}
}
- name: Install @playwright/test
shell: bash
run: npm install @playwright/test
- name: Run Playwright tests
shell: bash
env:
PLAYWRIGHT_TEST_URL: ${{ steps.pages.outputs.base_url }}
run: npx playwright test --project=chrome
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/

0 comments on commit 494aa4b

Please sign in to comment.