Skip to content
Merged
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
13 changes: 12 additions & 1 deletion .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,18 @@ jobs:
# this way). Not needed anyway -- this pushes with the default
# GITHUB_TOKEN, whose pushes do not trigger workflows.
git commit -m "Rebuild paper.pdf"
git push
# Another workflow can push to the same branch while the PDF builds
# (auto-bump-dev.yml bumps the version right after a merge to dev),
# which rejects a plain push. Rebase onto the branch head and retry;
# the bump never touches paper.pdf, so the rebase cannot conflict.
for attempt in 1 2 3; do
if git pull --rebase origin "$GITHUB_REF_NAME" && git push; then
exit 0
fi
sleep $((attempt * 5))
done
echo "::error::could not push the rebuilt paper.pdf after 3 attempts"
exit 1
else
echo "paper.pdf unchanged, nothing to commit"
fi
Loading