Skip to content

Merge pull request #14 from WCRP-CORDEX/pre-commit-ci-update-config #38

Merge pull request #14 from WCRP-CORDEX/pre-commit-ci-update-config

Merge pull request #14 from WCRP-CORDEX/pre-commit-ci-update-config #38

Workflow file for this run

name: deploy
on:
# Trigger the workflow on push to main branch
push:
branches:
- main
# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
build-and-deploy-book:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Set environment variables
run: |
echo "CONDA_ENV_FILE=archive-specifications/environment.yml" >> $GITHUB_ENV
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Create conda environment
uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
cache-downloads-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}"
environment-file: archive-specifications/environment.yml
create-args: >-
python=${{ matrix.python-version }}
- name: Version info
run: |
conda info -a
conda list
- name: Create domain plots
run: |
python scripts/create-domain-plots.py html
# Build the book
- name: Build the book
run: |
jupyter-book build archive-specifications
# Deploy the book's HTML to gh-pages branch
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: archive-specifications/_build/html