-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The latest
folder with redirects deleted by mike 2.0.0
#188
Comments
Unfortunately, I can't provide much support on private repos or Gitlab deployments, much less both, so the most I can do is to give you a couple pointers on where to look:
|
For now, I changed the Regarding your reply:
|
Yes, that's intended because aliases (e.g.
Doubtful, since mike 1.x didn't use symlinks at all. That's a new feature in 2.0.
Sorry about that. However, 2.0.0 was published as a major version update to prevent exactly this sort of problem: by pinning your deps (at least to the current major version), you can avoid silent updates that contain backwards-incompatible changes. I've been careful with mike to avoid any breaking changes when publishing minor/patch-level releases. |
I can confirm that this issue with mike 2.0 is also occurring on Github Enterprise Server 3.8. Symbolic links are not working. I checked the latest version docs (3.10) and in the release notes:
https://docs.github.com/en/[email protected]/admin/release-notes An excerpt of our workflow: - uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Publish docs
run: |
git config user.name github-workflow-bot
git config user.email [email protected]
git fetch origin
mike deploy --push --update-aliases ${{ github.ref_name }} latest
mike set-default --push latest |
Hmm. On the one hand, mike is primarily built to support Github Pages, so if it doesn't work by default on some Github instances, maybe symlinks should be opt-in. On the other hand, it might be more accurate to say that mike is primarily built to support github.com, so having it be opt-in would result in a worse behavior for the tool's main audience. As far as I can tell, Github Enterprise is at least kind enough to report an error in this case (not that I've tried to be sure). |
As suggested, I've resolved the issue by adding the mike deploy --push --update-aliases ${{ github.ref_name }} latest --alias-type=redirect |
We were also encountering the error
|
Are you sure about that? Version 1.1.2 doesn't use symlinks at all. It's a new feature in 2.0. (The "redirects" are small HTML pages with some HTML/JS redirect code, so the redirection happens client-side.) |
no-redirect flag:
|
That flag exists in v1.1.2, but it's choosing between copying the entire site vs creating HTML redirect pages for each page of your docs. The symlink code is new in v2.0.0 (here's the commit), and represents a third option. |
Well, it has fixed the prob concerning the recent Github behavior change with symlinks. So I just leave it there for other v1 users 🙂 |
Looking at your commit log, I think that's because you used mike 2.0.0 for a single commit. |
@Sispheor Your repo's GH Actions log looks a bit different from what I'd expect. You might want to check the repo settings to make sure it's using the defaults. This is what I use, and it works just fine with symlinks: |
Good catch! It's weird. Mike version is hard coded in the poetry descriptor. The ci should have kept V1. I'll investigate. Thanks for the heads-up! |
Thanks for this tip, @claudio-alvaro-wbgames, it worked! Just like @jimporter suggested in his first reply. |
@jimporter Hi, Just to confirm that indeed my CI was installing mike without precising the version. And during the last publish it used the 2.0. Thanks again for the pointer ! |
Tagging this as a 3.0 milestone change, since if we do adjust the default, it'll require a major version bump for semver compliance. |
IMO using Is there anything preventing making a 3.0 with just a fix for this, and pushing the rest of the milestone to a future 4.0? |
@ThinkChaos I looked at the repo from your issue (0xERR0R/blocky#1329), and I don't think this issue has anything to do with your problem. Since you're hosting your docs on Github via https://0xerr0r.github.io/blocky/, the default mike configuration with symlinks should just work. I think you have a different issue. I'd suggest making a new issue for your problem and adding all the info you can to the new issue form. (This issue occurs when people take the symlink-based aliases from mike and then try to copy their |
Thanks for the reply and checking that issue out! Turns out I got confused and the symlink seems to work fine. |
Summary
After running a pipeline which builds a site using Material for MkDocs and mike, all redirects are gone (the general URL for docs doesn't work, e.g.
https://my.docs.com
). Thelatest
folder is deleted by mike so the only way to open docs is to specify their version in the URL, e.g.https://my.docs.com/2.0
. mike adds thelatest
file which contains the latest version number but it does not seem to be used anywhere.Configuration and Logs
The git repository is private (GitLab), password-protected docs are deployed to Netlify from the
pages
branch.latest
alias):The text was updated successfully, but these errors were encountered: