Skip to content

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.

@samcunliffe
Copy link
Member

According to the CONTRIBUTING rules, I am merging because I don't have any comments. (Saransh is on holiday and I don't think this is controversial).

@samcunliffe samcunliffe merged commit 58c1968 into main Aug 26, 2025
15 checks passed
@samcunliffe samcunliffe deleted the mmg/gh-pages-deploy-action branch August 26, 2025 10:13
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