Skip to content

Use actions/deploy-pages to deploy docs in template #578

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

matt-graham
Copy link
Collaborator

Resolves #561
Resolve #574

Switches from the current branch based workflow for deploying MkDocs documentation to GitHub Pages in template to instead use actions/deploy-pages and removes suggestion in post-generation message displayed to user to set repository wide write permissions for Github Actions workflows in favour of using granular permissions in workflow file.

I originally completely removed the post-generation message as I thought by using the actions/deploy-pages approach we might be able to avoid having to do additional configuration of repository before site will deploy, but unfortunately it seems the default source setting for GitHub Pages on a new repository is branch so unless this is switched to GitHub Actions before doing the initial workflow run, the deploy job fails. I couldn't see any options for configuring this via CLI under gh repo edit.

Tested this works at https://github.com/matt-graham/docs-deploy-test and everything seems to work as expected provided manual configuration steps are done as indicated in updated message.

@matt-graham matt-graham requested a review from Saransh-cpp July 23, 2025 12:56
@samcunliffe samcunliffe added the enhancement New feature or request label Jul 23, 2025
@samcunliffe
Copy link
Member

Note to us: we should publish a new version once this is merged... it's a user-facing improvement.

  • tag new version on merge of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use granular GITHUB_TOKEN permissions in template docs workflow Deploy docs using GitHub Actions and not through a branch (in the template)
2 participants