File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 path : .cache
2626 restore-keys : |
2727 mkdocs-material-
28- - run : pip install -r requirements.txt
29- - run : mkdocs gh-deploy --force
30-
28+ - run : pip install -r requirements.txt
29+ # gh-deploy occasionally hits a transient HTTP 500 from GitHub on the
30+ # push to gh-pages (see run 25674953089). Retry a few times before
31+ # failing the job so a one-off blip doesn't take docs.reccehq.com down.
32+ - name : Deploy to gh-pages (with retry)
33+ env :
34+ DISABLE_MKDOCS_2_WARNING : " true"
35+ run : |
36+ set -e
37+ attempts=3
38+ delay=15
39+ for i in $(seq 1 "$attempts"); do
40+ if mkdocs gh-deploy --force; then
41+ echo "Deploy succeeded on attempt $i"
42+ exit 0
43+ fi
44+ if [ "$i" -lt "$attempts" ]; then
45+ echo "Deploy attempt $i failed; retrying in ${delay}s..."
46+ sleep "$delay"
47+ delay=$((delay * 2))
48+ fi
49+ done
50+ echo "Deploy failed after $attempts attempts"
51+ exit 1
You can’t perform that action at this time.
0 commit comments