Skip to content

Commit e584221

Browse files
committed
Update tutorial with new GH Pages deploy process
1 parent a5225ad commit e584221

1 file changed

Lines changed: 12 additions & 28 deletions

File tree

tutorial.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -189,60 +189,44 @@ When you pushed to `main` you will have triggered runs of the [GitHub actions](h
189189
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`.
190190

191191
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.
193193
We'll fix this in the next section.
194194

195195
For now, have a browse around the GitHub web interface.
196196

197197
## 📄 Configuring repository to host docs on GitHub Pages
198198

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.
200200
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/).
201201

202202
If you scroll back in your terminal to the end of the [cookiecutter] questions, you should be able to find a message like:
203203

204204
```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.
210207

211-
https://github.com/{github_owner}/{project_slug}/settings/actions
212-
213-
After the 'Documentation' workflow has successfully completed at least once
214-
you will also need to configure the repository to deploy a GitHub pages site
215-
from the content on the gh-pages branch by going to
208+
You will need to configure the repository to deploy a GitHub pages site using
209+
GitHub Actions by going to
216210

217211
https://github.com/{github_owner}/{project_slug}/settings/pages
218212

219-
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 'Built and deployment' selecting 'GitHub Actions' for 'Source'.
222214
```
223215

224216
As before replace `{github_owner}` and `{project_slug}` with the relevant GitHub repository owner and project slug that you chose at the start.
225217

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.
228219

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`.
231221

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.
233223

234224
- Go back to the Actions page. Select the Actions button (in the top bar), or visit
235225
`https://github.com/{github_owner}/{project_slug}/actions`.
236226
- 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.
242-
243-
- Set `Source` to `Deploy from branch` and `Branch` to `gh-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.
244229

245-
This will start another new workflow called `pages-build-deployment` (in the Actions page).
246230
When it finishes, you can view your HTML docs at:
247231

248232
```sh

0 commit comments

Comments
 (0)