You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorial.md
+17-31Lines changed: 17 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,60 +189,44 @@ When you pushed to `main` you will have triggered runs of the [GitHub actions](h
189
189
You can view the status of the workflow jobs by browsing the `Actions` button at the top bar of the repository homepage, which takes you to `https://github.com/{github_owner}/{project_slug}/actions`.
190
190
191
191
Depending on your account settings, you may find that the `Documentation` workflow shows as failed (❌).
192
-
If you see this it's probably because of the repository permissions settings for GitHub Actions.
192
+
If you see this it's probably because of the repository setting specifying the source for deploying a GitHub pages site from.
193
193
We'll fix this in the next section.
194
194
195
195
For now, have a browse around the GitHub web interface.
196
196
197
197
## 📄 Configuring repository to host docs on GitHub Pages
198
198
199
-
Now that your repository is on GitHub, you need to do a few more steps to set up your project's documentation website.
199
+
Now that your repository is on GitHub, you need to do one more step to set up your project's documentation website.
200
200
The HTML documentation will be built using the `Documentation` workflow (that we're going to fix) and hosted on [GitHub Pages](https://pages.github.com/).
201
201
202
202
If you scroll back in your terminal to the end of the [cookiecutter] questions, you should be able to find a message like:
203
203
204
204
```sh
205
-
The 'Documentation' GitHub Actions workflow has been set up to push the built
206
-
HTML documentation to a branch gh-pages on pushes to main for deploying as a
207
-
GitHub Pages website. To allow the GitHub Actions bot to push to the gh-pages
208
-
branch you need to enable'Read and write permissions' under 'Workflow
209
-
permissions' at
205
+
The 'Documentation' GitHub Actions workflow has been set up to deploy the built
206
+
HTML documentation to a GitHub Pages website on pushes to main.
and under 'Built and deployment' selecting 'Deploy from a branch'for the
220
-
'Source' drop-down and 'gh-pages'for the 'Branch' drop-down, leaving the
221
-
branch path drop-down with its default value of '/ (root)'.
213
+
and under 'Build and deployment' selecting 'GitHub Actions'for'Source'.
222
214
```
223
215
224
216
As before replace `{github_owner}` and `{project_slug}` with the relevant GitHub repository owner and project slug that you chose at the start.
225
217
226
-
The first part of the instructions explains how to set the permissions for GitHub Actions.
227
-
This lets the Actions bot push the built HTML documentation to a branch `gh-pages` when you update the default `main` branch.
218
+
Following tha instructions printed to the terminal, go to `https://github.com/{github_owner}/{project_slug}/settings/pages` and set GitHub Actions as the source for GitHub Pages.
228
219
229
-
- Go to the Actions settings page at the URL above (or via the repository `Settings` tab, then `Actions > General`).
230
-
- Set `Workflow permissions` to `Read and write permissions`.
220
+
- Set `Source` to `GitHub Actions`.
231
221
232
-
Now that the permissions have changed, we need to re-run the `Documentation` workflow.
222
+
Now that the source settings has been changed, we need to re-run the `deploy` job in the `Documentation` workflow.
233
223
234
224
- Go back to the Actions page. Select the Actions button (in the top bar), or visit
- Click on the failing entry for the `Documentation` workflow.
237
-
- Click on the `Re-run all jobs` button (top right of the page).
238
-
239
-
After the `Documentation` workflow finishes, a new `gh-pages` branch will be created containing only the HTML docs.
240
-
241
-
Following tha instructions printed to the terminal, go to `https://github.com/{github_owner}/{project_slug}/settings/pages` and set this branch as the source for GitHub Pages.
227
+
- Click on the drop down ▼ symbol next to `Re-run jobs` button (top right of the page) and click `Re-run failed jobs`.
228
+
- Click `Re-run jobs` button in dialogue box which appears which should list the `deploy` job as the failed job to re-run.
242
229
243
-
- Set `Source` to `Deploy from branch` and `Branch` to `gh-pages`.
244
-
245
-
This will start another new workflow called `pages-build-deployment` (in the Actions page).
246
230
When it finishes, you can view your HTML docs at:
247
231
248
232
```sh
@@ -309,10 +293,10 @@ uv venv --python 3.11.6
309
293
Once you have created and activated a virtual environment for the project, you can install the package in [editable mode](https://setuptools.pypa.io/en/latest/userguide/development_mode.html), along with both its required dependencies and optional sets of dependencies for development (`dev`), documentation (`docs`) and testing (`test`) by running
310
294
311
295
```sh
312
-
uv pip install --editable ".[dev,docs,test]"
296
+
uv sync --all-groups
313
297
```
314
298
315
-
from the root of the project repository.
299
+
from the root of the project repository. Note that `uv>=0.6.7` is required to use the `--group` option.
316
300
317
301
<details><summary>Using venv as an alternative to uv </summary> <!-- markdownlint-disable-line MD033 -->
0 commit comments