Skip to content

Commit fcc253c

Browse files
Update build_book.yml
1 parent 553c6d3 commit fcc253c

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/build_book.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
packages: write
1616

1717
steps:
18-
- name: checkout
18+
- name: checkout production
1919
uses: actions/checkout@v2
2020
with:
2121
ref: 'production'
@@ -32,5 +32,23 @@ jobs:
3232
publish_dir: source/_build/html
3333
cname: python.datasciencebook.ca
3434
force_orphan: true # this will clean up all previous PR previews / main branch preview
35+
36+
# rebuild the dev version after the previous copy was cleaned out
37+
- name: checkout main
38+
uses: actions/checkout@v2
39+
with:
40+
ref: 'main'
41+
42+
- name: Build the book
43+
run: |
44+
./build_html.sh
3545
36-
46+
# Push the book's HTML to github-pages
47+
- name: GitHub Pages action
48+
uses: peaceiris/[email protected]
49+
with:
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
publish_dir: source/_build/html
52+
keep_files: true
53+
destination_dir: dev
54+
# force_orphan: true # once peaceiris updates to v4, change this to true and keep_files: true for the PR / main branch deploy previews

0 commit comments

Comments
 (0)