Skip to content

CREST Adapter

CREST Adapter #789

Workflow file for this run

name: github pages
on:
push:
branches: [ main, docs ]
pull_request:
branches: [ main, docs ]
types: [opened, synchronize, reopened, ready_for_review]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# ── clone ARC repo ───────────────────────────────────────────
- name: Checkout ARC
uses: actions/checkout@v4
with:
repository: ReactionMechanismGenerator/ARC
path: ARC
fetch-depth: 1
# ── rmg_env for Arkane/database availability ───────────────
- name: Set up micromamba (rmg_env)
uses: mamba-org/setup-micromamba@v2
with:
environment-name: rmg_env
create-args: >-
-c rmg -c conda-forge python=3.9 numpy<2 rmg=3.3.0 connie::symmetry
cache-environment: true
cache-downloads: true
generate-run-shell: false
# ── docs env (wrapper shell) ────────────────────────────────
- name: Set up micromamba (arc_env)
uses: mamba-org/setup-micromamba@v2
with:
environment-name: arc_env
environment-file: ARC/environment.yml
cache-environment: true
cache-downloads: true
# ── Complie ARC ──────────────────────
- name: Build ARC in arc_env
run: micromamba run -n arc_env make compile -C ARC -j"$(nproc)"
# ── Install pyrdl ──────────────────────
- name: Install pyrdl
run: micromamba run -n arc_env make install-pyrdl -C ARC -j"$(nproc)"
# ── minimal TeX for png‑math in Sphinx ──────────────────────
- name: System TeX tools
run: sudo apt-get update -y && sudo apt-get -y install texlive-latex-extra dvipng
# ── add legacy ABI runtime for NumPy/PyDAS ─────────────────
- name: Add legacy gfortran runtime
run: micromamba install -y -n arc_env -c conda-forge libgfortran=3
shell: micromamba-shell {0}
# ── build HTML docs ─────────────────────────────────────────
- name: Set env vars & Build docs
run: |
export RMG_DB_PATH="$MAMBA_ROOT_PREFIX/envs/rmg_env/share/RMG-database"
export PYTHONPATH="$GITHUB_WORKSPACE/ARC:$PYTHONPATH"
export PATH="$GITHUB_WORKSPACE/ARC:$PATH"
make -C ARC/docs html
shell: micromamba-shell {0}
- name: List built docs
run: ls -R ARC/docs/build/html
# ── deploy only on push ─────────────────────────────────────
- name: Deploy to GitHub Pages
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./ARC/docs/build/html/