You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is some small feedback on the GitHub Actions section in the "Publishing your site" page, which while already fairly good, could perhaps receive some smaller improvements.
Overall are there only 3 things I would like to address here.
The first one is the first step:
- uses: actions/checkout@v4
This setup has the issue, that a fetch-depth of 1 is used by default, meaning only a shallow fetch is being performed.
This can cause problems if a user is using MkDocs plugins that utilize git to fetch information (Commit history). A prime example would be the git-localized-revision-date plugin, which would print warnings about inaccurate commit history.
It should be addressed (possibly in an annotation) that this problem could be caused and that a fix would be to apply a fetch-depth of 0:
This step is for the most part not necessary. The checkout action should've set up the git configuration already and most if not all actions required don't need a user setup. I assume this step is needed due to the reliance on the gh-deploy command of MkDocs?
If that is the case, then the next point would be a recommended change to consider for sure.
The final point is to not recommend the usage of mkdocs gh-deploy in GitHub Actions, especially given that it is mentioned later on anyways as its own section.
Instead, a direct deployment to GitHub Pages should be done here. This, however, would require some multiple adjustments to the example file like this (less condensed for better readability):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is some small feedback on the GitHub Actions section in the "Publishing your site" page, which while already fairly good, could perhaps receive some smaller improvements.
Overall are there only 3 things I would like to address here.
The first one is the first step:
This setup has the issue, that a fetch-depth of 1 is used by default, meaning only a shallow fetch is being performed.
This can cause problems if a user is using MkDocs plugins that utilize git to fetch information (Commit history). A prime example would be the git-localized-revision-date plugin, which would print warnings about inaccurate commit history.
It should be addressed (possibly in an annotation) that this problem could be caused and that a fix would be to apply a fetch-depth of 0:
The second point is on the step right afterwards:
This step is for the most part not necessary. The checkout action should've set up the git configuration already and most if not all actions required don't need a user setup. I assume this step is needed due to the reliance on the
gh-deploy
command of MkDocs?If that is the case, then the next point would be a recommended change to consider for sure.
The final point is to not recommend the usage of
mkdocs gh-deploy
in GitHub Actions, especially given that it is mentioned later on anyways as its own section.Instead, a direct deployment to GitHub Pages should be done here. This, however, would require some multiple adjustments to the example file like this (less condensed for better readability):
This setup would bring several benefits to the user:
This actions setup, while a bit bigger, would offer a better use of GitHub Actions.
I hope the changes can be considered.
Beta Was this translation helpful? Give feedback.
All reactions