Skip to content

Commit 3dc09d7

Browse files
committed
ci: work around temperamental kroki API
The build step performs requests against kroki.io, which are notoriously flaky. We'll now retry this step up to three times and only then assume something is actually wrong, rather than reporting failure due to a temperamental API. Signed-off-by: Luca Zeuch <[email protected]>
1 parent 0a39160 commit 3dc09d7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/hugo.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,15 @@ jobs:
4545
run: |
4646
[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true
4747
48+
# The website builds are notoriously flaky; specifically, Kroki tends to return
49+
# a "Bad Request" error for no apparent reason. We will retry up to 3 times and then
50+
# assume that the build is actually broken, rather than temperamental.
4851
- name: Build website
49-
run: npm run build
52+
uses: nick-fields/retry@v3
53+
with:
54+
retry_on: error
55+
max_attempts: 3
56+
command: npm run build
5057

5158
- name: Setup Pages
5259
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

0 commit comments

Comments
 (0)