Skip to content

Update GitHub Actions workflow#6720

Merged
squidfunk merged 2 commits intosquidfunk:masterfrom
uschmidt83:patch-1
Feb 1, 2024
Merged

Update GitHub Actions workflow#6720
squidfunk merged 2 commits intosquidfunk:masterfrom
uschmidt83:patch-1

Conversation

@uschmidt83
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants