mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 14:45:52 +00:00
38 lines
1.4 KiB
Markdown
38 lines
1.4 KiB
Markdown
# Exercise: Deploy Book Workflow
|
|
|
|
The **Deploy Book Workflow (DBW)** automatically builds and publishes your TeachBook whenever changes are pushed to your repository. If you started your book from the TeachBooks Template, this workflow is already included.
|
|
|
|
With this workflow, readers can see your latest book version online without manual intervention. This exercise will guide you through triggering the workflow, configuring branch-specific builds, and customising deployment options.
|
|
|
|
::::::{topic} Exercise objective
|
|
Can you trigger, configure, and monitor the Deploy Book Workflow to publish your TeachBook automatically?
|
|
::::::
|
|
|
|
|
|
|
|
## Trigger the workflow
|
|
|
|
1. Make a small edit in any page of your book (for example `book/intro.md`).
|
|
2. Commit the change and push it to the `main` branch.
|
|
3. Open the **Actions** tab of your repository. You should see a workflow called *Deploy Book* running.
|
|
4. When it finishes, visit the URL:
|
|
|
|
````
|
|
https://<username>.github.io/<repository-name>/
|
|
````
|
|
|
|
to see the updated book.
|
|
|
|
|
|
5. The workflow can also be triggered in a separate branch. Create a new branch, e.g., `draft-chapter`.
|
|
6. Push a change to this branch.
|
|
7. The DBW automatically builds a version of your book for that branch, available at:
|
|
|
|
````
|
|
https://<username>.github.io/<repository-name>/draft-chapter/
|
|
````
|
|
|
|
```{tip}
|
|
Branch-specific builds are useful for previewing work in progress without affecting the main book.
|
|
```
|
|
|