Issue with PR Preview deployment for MkDocs Site
Hi!
I’m using Cloudflare Workers to host a documentation site I built with MkDocs Material and I’ve encountered some confusion regarding PR previews and the site/ folder.
Currently, for the PR preview links to appear in GitHub, my repository requires the site/ folder to exist at the root. This folder contains the HTML, CSS, and JS generated by running mkdocs build locally. Without it, the preview link does not appear, even though the Markdown and asset changes are already tracked in the repository.
I set mkdocs build as my build command on Cloudflare, but if the root site/ folder I generated locally isn’t present, nothing gets built even after Cloudflare runs the same build command. As a result, PR previews don’t work unless the site/ folder exists in the repository.
I’m concerned this might cause issues for contributors. Specifically, I’m unsure whether:
1. Contributors will need to manually run mkdocs build and commit changes to the site/ folder every time they make updates.
2. Excluding the site/ folder via .gitignore will break PR preview functionality.
3. There is a recommended workflow that allows PR previews without committing the generated site/ folder.
Any guidance on the recommended approach for managing MkDocs sites with Cloudflare Workers would be greatly appreciated. This will help ensure contributors can collaborate efficiently without unnecessary build steps.
This is the repo I’m working with: https://github.com/WriteTech-Hub/writetech-doc-review
Thank you.
GitHub
GitHub - WriteTech-Hub/writetech-doc-review: WriteTech DocReview Se...
WriteTech DocReview Series is a community-driven effort to improve the quality of technical documentation. This initiative allows community members to enhance their technical writing skills, build ...
0 Replies