Skip to content
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

Update GitHub Actions workflow #6720

Merged
merged 2 commits into from Feb 1, 2024
Merged

Conversation

uschmidt83
Copy link
Contributor

Update action versions for 'setup-python' and 'cache'.

Set 'fetch-depth: 0' for 'checkout' action to obtain correct document dates when using 'mkdocs-git-revision-date-localized-plugin' (cf. https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/blob/v1.2.2/mkdocs_git_revision_date_localized_plugin/ci.py#L37-L48)

Update action versions for 'setup-python' and 'cache'.

Set 'fetch-depth: 0' for 'checkout' action to obtain correct document dates when using 'mkdocs-git-revision-date-localized-plugin' (cf. https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/blob/v1.2.2/mkdocs_git_revision_date_localized_plugin/ci.py#L37-L48)
@squidfunk
Copy link
Owner

squidfunk commented Feb 1, 2024

Thanks for suggesting. There are two changes in this PR that need discussion. We're happy to update the versions of the GitHub Actions, but we should not add fetch depth. The reason is that not all users are using the git revision date plugin, and adding fetch depth will significantly slow down your build, as it now fetches the entire history. This must be a deliberate decision. Imagine the cost that would add to all projects using Material for MkDocs, not using the history but fetching everything nonetheless. The publishing your site guide aims to be as minimal as possible.

If you remove this change, we're happy to merge your PR.

Remove fetch-depth for checkout action (revert)

Also update Insiders workflow.
@uschmidt83
Copy link
Contributor Author

The reason is that not all users are using the git revision date plugin, and adding fetch depth will significantly slow down your build, as it now fetches the entire history.

Sure. I didn't realize that it would (cumulatively) be a big deal.

I also overlooked the When using build environments box under the Document dates.

@squidfunk
Copy link
Owner

Thanks! Yeah, it would be a huge waste of resources.

@squidfunk squidfunk merged commit 39507ac into squidfunk:master Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants