Skip to content

Commit

Permalink
Re added a build and deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreAdam committed Jul 8, 2024
1 parent 729bb87 commit 0f88005
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build_and_deploy_book.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and Deploy Jupyter Book

on:
push:
branches:
- main

jobs:
build-book:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install Jupyter Book
run: pip install jupyter-book

- name: Install dependencies
run: pip install -r docs/requirements.txt

- name: Build Jupyter Book
run: jupyter-book build docs

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: jupyter-book-html
path: docs/_build/html

deploy-pages:
runs-on: ubuntu-latest
needs: build-book
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: jupyter-book-html
path: docs/_build/html

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html

0 comments on commit 0f88005

Please sign in to comment.