diff --git a/.github/workflows/publish-book.yml b/.github/workflows/publish-book.yml new file mode 100644 index 0000000..61eda89 --- /dev/null +++ b/.github/workflows/publish-book.yml @@ -0,0 +1,33 @@ +name: publish-book + +on: + push: + branches: + - main + +jobs: + deploy-book: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + python -m pip install .[docs] + pip install jupyter-book sphinxcontrib-mermaid + + - name: Build the book + run: | + jupyter-book build . + + - name: GitHub Pages action + uses: peaceiris/actions-gh-pages@v3.9.3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_build/html