File tree Expand file tree Collapse file tree 2 files changed +34
-23
lines changed
Expand file tree Collapse file tree 2 files changed +34
-23
lines changed Original file line number Diff line number Diff line change 1+ name : deploy-book
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ deploy-book :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+
14+ - name : Set up Python 3.9
15+ uses : actions/setup-python@v2
16+ with :
17+ python-version : 3.9
18+
19+ - name : Install dependencies
20+ run : |
21+ pip install jupyter-book
22+ pip install ghp-import
23+
24+ - name : Build the book
25+ run : |
26+ jupyter-book build . --config manuscript-website/_config.yml --toc manuscript-website/_toc.yml
27+
28+ - name : GitHub Pages action
29+ uses : peaceiris/actions-gh-pages@v3.6.1
30+ with :
31+ github_token : ${{ secrets.GITHUB_TOKEN }}
32+ publish_dir : ./_build/html
33+
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ jobs:
197197
198198 - name: Build the book
199199 run: |
200- jupyter-book build .
200+ jupyter-book build . --config manuscript-website/_config.yml --toc manuscript-website/_toc.yml
201201
202202 - name: GitHub Pages action
203203 uses: peaceiris/actions-gh-pages@v3.6.1
@@ -207,25 +207,3 @@ jobs:
207207` ` `
208208
209209This will automatically rebuild and publish your book whenever you push changes to the main branch.
210-
211- # # 10. Updating Your Book
212-
213- When you make changes :
214-
215- 1. Edit your content
216- 2. Rebuild the book :
217- ` ` ` bash
218- jupyter-book build .
219- ` ` `
220- 3. Push to GitHub :
221- ` ` ` bash
222- git add .
223- git commit -m "Update content"
224- git push
225- ` ` `
226- 4. If not using GitHub Actions, redeploy :
227- ` ` ` bash
228- ghp-import -n -p -f _build/html
229- ` ` `
230-
231- With GitHub Actions set up, your site will automatically update after you push changes to the main branch.
You can’t perform that action at this time.
0 commit comments