Adding config and action #1
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: deploy-book | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
deploy-book: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: conda env create | |
run: | | |
source '/usr/share/miniconda/etc/profile.d/conda.sh' | |
conda create -n jbook -c conda-forge jupyter-book python=3.11 | |
- name: Build the book | |
run: | | |
source '/usr/share/miniconda/etc/profile.d/conda.sh' | |
conda activate jbook | |
jupyter-book build . | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: '_build/html/' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |