Skip to content

Commit a15d105

Browse files
Merge pull request #273 from UBC-DSCI/trevorcampbell-patch-1
add new workflows to readme
2 parents a06184a + 9a77e13 commit a15d105

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ See [the license file](LICENSE.md) for more information.
1818

1919
Building the book requires Docker (instructions here: [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/)).
2020

21-
### Contributing
22-
Primary development in this repository happens on the `main` branch. If you want to contribute to the book,
23-
please branch off of `main` and make a pull request into `main`.
24-
25-
The `production` branch contains the source material for the live, publicly viewable HTML book.
26-
2721
### Build locally
2822

2923
You can build the HTML version of the book on your own machine by running
@@ -38,15 +32,34 @@ You can build the PDF version of the book on your own machine by running
3832
```
3933
in the root directory of this repository. The book can be viewed in a PDF reader by opening `source/_build/latex/python.pdf`.
4034

41-
### Update build environment
35+
### Contributing
36+
Primary development in this repository happens on the `main` branch. If you want to contribute to the book,
37+
please branch off of `main` and make a pull request into `main`. You cannot commit directly to `main`.
38+
39+
The `production` branch contains the source material corresponding to the current publicly-viewable version of the book website.
40+
41+
The `gh-pages` branch serves the current book website at https://python.datasciencebook.ca.
42+
43+
### Workflows
44+
45+
#### Book deployment
46+
47+
You can update the live, publicly viewable HTML book by making changes to the `source/` folder in the `production` branch (e.g. by merging `main` into `production`).
48+
GitHub will trigger a rebuild of the public HTML site, and store the built book in the root folder of the `gh-pages` branch.
49+
50+
#### `main` deploy previews
51+
52+
Any commit to `source/**` on the `main` branch (from a merged PR) will trigger a rebuild of the development preview site served at `https://python.datasciencebook.ca/dev`.
53+
The built preview book will be stored in the `dev/` folder on the `gh-pages` branch.
54+
55+
#### PR deploy previews
4256

43-
You can update the build environment for the book by making changes to `Dockerfile` in the root of the repository in the `main` branch.
44-
If you push any changes to the `Dockerfile` on the `main` branch, GitHub will trigger a rebuild of the docker image,
45-
push it to DockerHub, and update the `build_html.sh` script and book deploy GitHub action with the new image tag.
57+
Any PR to `source/` will trigger a build of a PR preview site at `https://python.datasciencebook.ca/pull###`, where `###` is the number of the pull request.
58+
The built preview book will be stored in the `pull###/` folder on the `gh-pages` branch.
4659

47-
### Update public html
60+
#### Build environment updates
4861

49-
You can update the live, publicly viewable HTML book by making changes to the `source/` folder in the `production` branch.
50-
If you push any changes to the `source/` folder on the `production` branch, GitHub will trigger a rebuild of the public HTML site.
62+
Any PR to `Dockerfile` will trigger a rebuild of the docker image, push it to DockerHub, and update the image tags in the `build_html.sh` and `build_pdf.sh` scripts on the PR automatically.
63+
This new build environment will be used for the PR deploy preview mentioned above.
5164

5265

0 commit comments

Comments
 (0)