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

Adding further instructions for GitHub pages docs deployment in hook #404

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

matt-graham
Copy link
Collaborator

Fixes #391

Adds some text to be printed out in post_gen_project.py hook when deploy_docs_to_github_pages cookiecutter option is True to give instructions on how to complete set up of deployment of HTML documentation on GitHub Pages.

Example output:

Initialized empty Git repository in /home/matt/projects/test-package/.git/
GitHub CLI detected, you can create a repo with the following:

gh repo create matt-graham/test-package -d 'A cookiecutter package with UCL ARC recommendations.' --public -r origin --source test-package

The 'Documentation' GitHub Actions workflow has been set up to push the built HTML 
documentation to a branch gh-pages on pushes to main for deploying as a GitHub 
Pages website. To allow the GitHub Actions bot to push to the gh-pages branch you 
need to enable 'Read and write permissions' under 'Workflow permissions' at

https://github.com/matt-graham/test-package/settings/actions

After the 'Documentation' workflow has successfully completed at least once you will 
also need to configure the repository to deploy a GitHub pages site from the content 
on the gh-pages branch by going to

https://github.com/matt-graham/test-package/settings/pages

and under 'Built and deployment' selecting 'Deploy from a branch' for the 'Source' 
drop-down and 'gh-pages' for the 'Branch' drop-down, leaving the branch path 
drop-down with its default value of '/ (root).

@matt-graham matt-graham added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 6, 2024
@matt-graham matt-graham changed the title Adding further instructions forGitHub pages docs deployment in hook Adding further instructions for GitHub pages docs deployment in hook Jun 6, 2024
Copy link
Member

@paddyroddy paddyroddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🫐

"{{cookiecutter.project_slug}}/settings/pages\n\n"
"and under 'Built and deployment' selecting 'Deploy from a branch' for "
"the 'Source' drop-down and 'gh-pages' for the 'Branch' drop-down, "
"leaving the branch path drop-down with its default value of '/ (root)'."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks clear to me!

@matt-graham matt-graham merged commit ddaba22 into main Jun 6, 2024
12 checks passed
@matt-graham matt-graham deleted the mmg/deploy-docs-instructions branch June 6, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print out details of how to configure repository to allow deploying docs in post_gen_project.py hook
3 participants