Skip to content

deploy-book

deploy-book #126

Workflow file for this run

name: deploy-book
on:
push:
branches:
- 'publication'
workflow_run:
workflows: ["Weekly book publish"]
types:
- completed
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install graphviz
run: sudo apt-get update && sudo apt-get install graphviz
# Install dependencies
- name: Set up Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
run: |
pip install -r ./book/requirements.txt
# Build the book
- name: Build the book
run: |
jupyter-book build book
- name: Create cname file
uses: finnp/create-file-action@master
env:
FILE_NAME: "./book/_build/html/CNAME"
FILE_DATA: "book.oceaninfohub.org"
# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/_build/html