0.1.0 🌈 #25
Workflow file for this run
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: Publish book | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
build-book: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Setup environment | |
run: pip install --upgrade jupyter-book==0.13.2 jupytext beautifulsoup4 | |
- name: Cache jupyter-cache folder | |
uses: actions/cache@v2 | |
env: | |
cache-name: jupyter-cache | |
with: | |
path: jupyter-book/_build/.jupyter_cache | |
key: v1-${{ github.ref }}-${{ hashFiles('notebook_scripts/**/*.py') }} | |
restore-keys: | | |
v1-${{ github.ref }}-${{ hashFiles('notebook_scripts/**/*.py') }} | |
v1-${{ github.ref }} | |
v1-refs/heads/master | |
- name: Build the JupyterBook | |
run: make | |
- name: Create CNAME record | |
run: | | |
cd ./jupyter-book/_build/html/ | |
echo "www.sc-best-practices.org" > CNAME | |
- name: Deploy to Github Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./jupyter-book/_build/html/ |