Skip to content

Commit da6c134

Browse files
committed
Try adding a github action to build and deploy book
1 parent 5aebd2c commit da6c134

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

.github/workflows/deploy.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: deploy-book
2+
3+
# Only run this when the master branch changes
4+
on:
5+
push:
6+
branches:
7+
- main
8+
# If your git repository has the Jupyter Book within some-subfolder next to
9+
# unrelated files, you can make this run only if a file within that specific
10+
# folder has been modified.
11+
#
12+
# paths:
13+
# - some-subfolder/**
14+
15+
# This job installs dependencies, build the book, and pushes it to `gh-pages`
16+
jobs:
17+
deploy-book:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
# Install dependencies
23+
- name: Set up Python 3.7
24+
uses: actions/setup-python@v1
25+
with:
26+
python-version: 3.7
27+
28+
- name: Install dependencies
29+
run: |
30+
pip install -r requirements.txt
31+
32+
# Build the book
33+
- name: Build the book
34+
run: |
35+
jupyter-book build .
36+
37+
# Push the book's HTML to github-pages
38+
- name: GitHub Pages action
39+
uses: peaceiris/[email protected]
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: ./_build/html

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ bibtex_bibfiles:
2121

2222
# Information about where the book exists on the web
2323
repository:
24-
url: https://foundations.projectpythia.org # Online location of your book
24+
url: https://projectpythia.github.io/pythia-foundations # Online location of your book
2525
#path_to_book: docs # Optional path to your book, relative to the repository root
2626
branch: main # Which branch of the repository should be used when creating links (optional)
2727

0 commit comments

Comments
 (0)