week 2 and week 3 initialize files (#40) #18
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 JupyterBook to GitHub pages | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "notebooks/**" | |
- "book/**" | |
- "ci/envs/311-book.yaml" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
BuildBook: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: ci/envs/311-book.yaml | |
# Copy notebooks to book assignments directory | |
- name: Prepare notebooks for book | |
run: | | |
rsync -av --delete notebooks/ book/assignments/ | |
# Build the JupyterBook | |
- name: Build JupyterBook | |
run: | | |
jupyter-book build book/ | |
- name: Deploy html files | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: book/_build/html |