Skip to content

Commit efe553c

Browse files
update build_book workflow to persist dev copy
1 parent 8faa341 commit efe553c

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/build_book.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
packages: write
2323

2424
steps:
25-
- name: checkout
25+
- name: checkout production
2626
uses: actions/checkout@v2
2727
with:
2828
ref: 'production'
@@ -40,3 +40,22 @@ jobs:
4040
force_orphan: true # this will clean up all previous PR previews / main branch preview
4141
cname: datasciencebook.ca
4242

43+
# rebuild the dev version after the previous copy was cleaned out
44+
- name: checkout main
45+
uses: actions/checkout@v2
46+
with:
47+
ref: 'main'
48+
49+
- name: Build the book
50+
run: |
51+
./build_html.sh
52+
53+
# Push the book's HTML to github-pages
54+
- name: GitHub Pages action
55+
uses: peaceiris/[email protected]
56+
with:
57+
github_token: ${{ secrets.GITHUB_TOKEN }}
58+
publish_dir: docs/
59+
keep_files: true
60+
destination_dir: dev
61+

0 commit comments

Comments
 (0)