Fix docs deploy failing to push gh-pages on every release - #1709
Merged
Conversation
The docs deploy has failed on every release: the shallow tag-only checkout leaves no origin/gh-pages remote-tracking ref, so mike's update_from_upstream no-ops, mike commits an orphan gh-pages, and the push is rejected as a non-fast-forward. Fetch gh-pages into the remote-tracking ref before mike deploy so it bases the new commit on the current docs and fast-forwards. Also serialize deploys with a concurrency group and replace the invalid workflow_dispatch tags filter with a version input so a release can be deployed manually.
Merging this PR will improve performance by 15.25%
Performance Changes
Tip Curious why this is faster? Comment Comparing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MkDocs/mike docs deploy has failed on every release since 0.21.0. The checkout is shallow and only fetches the pushed tag, so the
origin/gh-pagesremote-tracking ref never exists locally. mike'supdate_from_upstream()then no-ops, mike commits an orphangh-pages, and the push is rejected as a non-fast-forward (! [rejected] gh-pages -> gh-pages (fetch first)).Fetch
gh-pagesinto the remote-tracking ref beforemike deployso it bases the new commit on the current docs and fast-forwards. Also adds aconcurrencygroup to serialize deploys and replaces the invalidworkflow_dispatch: tags:filter with aversioninput.Takes effect for releases tagged after this merges; 0.26.0's docs (which never published) can then be deployed via Run workflow with version
0.26.0.