|
7 | 7 | _EXIT_SUCCESS = 0 |
8 | 8 |
|
9 | 9 |
|
10 | | -def main(initialise_git_repository: str, deploy_docs_to_github_pages: str) -> int: |
| 10 | +def main(initialise_git_repository: str) -> int: |
11 | 11 | """ |
12 | 12 | Create a git repository on generation of the project. |
13 | 13 |
|
14 | 14 | Args: |
15 | 15 | initialise_git_repository: Whether to initialise the repo |
16 | | - deploy_docs_to_github_pages: Whether to deploy built docs to GitHub Pages |
17 | 16 |
|
18 | 17 | Returns: |
19 | 18 | The return code of the process |
@@ -84,30 +83,8 @@ def main(initialise_git_repository: str, deploy_docs_to_github_pages: str) -> in |
84 | 83 | # some other error |
85 | 84 | print(f"There was an error with the GitHub CLI: {e.returncode}\n{e.stderr}") |
86 | 85 | return _EXIT_FAILURE |
87 | | - if deploy_docs_to_github_pages == "True": |
88 | | - print( |
89 | | - "The 'Documentation' GitHub Actions workflow has been set up to push the " |
90 | | - "built HTML documentation to a branch gh-pages on pushes to main for " |
91 | | - "deploying as a GitHub Pages website. To allow the GitHub Actions bot to " |
92 | | - "push to the gh-pages branch you need to enable 'Read and write " |
93 | | - "permissions' under 'Workflow permissions' at\n\n" |
94 | | - "{{cookiecutter.__repo_url}}/settings/actions\n\n" |
95 | | - "After the 'Documentation' workflow has successfully completed at least " |
96 | | - "once you will also need to configure the repository to deploy a GitHub " |
97 | | - "pages site from the content on the gh-pages branch by going to\n\n" |
98 | | - "{{cookiecutter.__repo_url}}/settings/pages\n\n" |
99 | | - "and under 'Built and deployment' selecting 'Deploy from a branch' for " |
100 | | - "the 'Source' drop-down and 'gh-pages' for the 'Branch' drop-down, " |
101 | | - "leaving the branch path drop-down with its default value of '/ (root)'." |
102 | | - ) |
103 | | - |
104 | 86 | return _EXIT_SUCCESS |
105 | 87 |
|
106 | 88 |
|
107 | 89 | if __name__ == "__main__": |
108 | | - sys.exit( |
109 | | - main( |
110 | | - "{{ cookiecutter.initialise_git_repository }}", |
111 | | - "{{ cookiecutter.deploy_docs_to_github_pages }}", |
112 | | - ) |
113 | | - ) |
| 90 | + sys.exit(main("{{ cookiecutter.initialise_git_repository }}")) |
0 commit comments