Make docs workflow idempotent by using --update-aliases flag - #36
Merged
Conversation
Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>
hzhangxyz
marked this pull request as ready for review
November 26, 2025 02:16
Copilot
AI
changed the title
[WIP] Update docs workflow to handle existing alias error
Make docs workflow idempotent by handling existing alias error
Nov 26, 2025
hzhangxyz
requested changes
Nov 26, 2025
hzhangxyz
left a comment
Member
There was a problem hiding this comment.
你看看这个:
mike deploy [version] [alias]...
If [version] already exists, this command will also update all of the pre-existing aliases for it. Normally, if an alias specified on the command line is already associated with another version, this will return an error. If you do want to move an alias from another version to this version (including when the new version itself was previously an alias), you can pass -u/--update-aliases to allow this. For example, this can be useful when releasing a new version and updating the latest alias to point to this new version.
似乎在原本的基础上,加个参数就行了
Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>
Contributor
Author
You're right! Updated to use |
Copilot
AI
changed the title
Make docs workflow idempotent by handling existing alias error
Make docs workflow idempotent by using --update-aliases flag
Nov 26, 2025
hzhangxyz
approved these changes
Nov 26, 2025
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 docs workflow fails when re-running on the same tag because
mike deployerrors with "alias 'latest' already exists for version X".Changes
--update-aliasesflag tomike deploycommand to allow updating existing aliasesThis flag allows mike to update aliases that already exist, making the command idempotent without needing error handling.
Fixes failing run: https://github.com/USTC-KnowledgeComputingLab/ds/actions/runs/19689926624/job/56403396937
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.