-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
name: CI | ||
name: deploy | ||
|
||
# Only trigger, when the submodules workflow succeeded | ||
on: | ||
# Trigger the workflow on push to main branch and tutorial path | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- docs/** | ||
|
||
# This job installs dependencies, build the jupyter notebook, and pushes it to `render`, a new `branch` | ||
jobs: | ||
docs-build: | ||
runs-on: ubuntu-latest | ||
build: | ||
name: Setup | ||
runs-on: "ubuntu-latest" | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
- name: Set up conda and dependencies | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
submodules: true | ||
- name: Setup Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r docs/requirements.txt | ||
- name: Build JupyterBook | ||
working-directory: ./docs | ||
environment-file: environment.yml | ||
environment-name: gfts | ||
condarc: | | ||
channels: | ||
- conda-forge | ||
# Build the book | ||
- name: Build the jupyter book | ||
run: | | ||
jupyter-book build . | ||
- name: Publish | ||
uses: peaceiris/[email protected] | ||
jupyter-book build docs | ||
# Deploy the book's HTML to gh-pages branch | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/_build/html | ||
publish_dir: docs/_build/html | ||
force_orphan: true |