Skip to content

Commit

Permalink
update deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
acocac committed Jul 24, 2024
1 parent 3fd286e commit e964854
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions .github/workflows/deploy.yml
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

0 comments on commit e964854

Please sign in to comment.