Skip to content

Update main.yml

Update main.yml #55

Workflow file for this run

name: deploy-book
on:
push:
branches:
- master
workflow_dispatch:
pull_request:
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Generate Table of Contents
run: |
jupyter-book toc from-project . --extension .md --extension .ipynb
- name: Build the book
run: |
jupyter-book build .
# Push the book's HTML to github-pages
- name: GitHub Pages action
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: peaceiris/actions-gh-pages@v3.5.9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
- name: Update Sitemap
run: |
python -u update_sitemap.py