Izh start #149
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy-website | |
# Only run when anything in the website or notebooks directories changes | |
on: | |
push: | |
paths: | |
- .github/workflows/deploy-web.yml | |
- nb/** | |
- web/** | |
# Install dependencies, build the book, and push it to `gh-pages` branch. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Restore cached pip downloads | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ hashFiles('web/requirements.txt') }} | |
- name: pip install -r web/requirements.txt | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -r web/requirements.txt | |
- name: Build the book | |
working-directory: web | |
run: python build.py | |
- name: Push the book's HTML to gh-pages branch | |
uses: peaceiris/actions-gh-pages@v3.6.1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: web/_build/html |