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: README.md
+26-13Lines changed: 26 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,6 @@ See [the license file](LICENSE.md) for more information.
18
18
19
19
Building the book requires Docker (instructions here: [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/)).
20
20
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
-
27
21
### Build locally
28
22
29
23
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
38
32
```
39
33
in the root directory of this repository. The book can be viewed in a PDF reader by opening `source/_build/latex/python.pdf`.
40
34
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
42
56
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.
46
59
47
-
###Update public html
60
+
#### Build environment updates
48
61
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.
0 commit comments