Skip to content

refactor to choicemodel class and add sar style #26

refactor to choicemodel class and add sar style

refactor to choicemodel class and add sar style #26

Workflow file for this run

---
name: Build Docs
on:
push:
branches: [dev]
tags:
- "v*"
pull_request:
branches:
- "*"
workflow_dispatch:
inputs:
version:
description: Manual Doc Build
default: run-doc-build
required: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docs:
name: Build & push docs
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
matrix:
os: ["ubuntu-latest"]
environment-file: [docs/docs_env.yml]
experimental: [false]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: "latest"
- name: Install package
run: pip install . --no-deps
- name: Make docs
run: cd docs; make html
env:
CENSUS: ${{ secrets.CENSUS }}
- name: Zip documentation
if: ${{ github.event_name == 'pull_request' }}
run: zip docs_artifact.zip docs/build/html -r
- name: Upload artifact
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: docs_artifact
path: docs_artifact.zip
- name: Publish to Github Pages on dev (dev)
if: ${{ github.ref == 'refs/heads/dev' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html/
destination_dir: dev
keep_files: false
- name: Publish to Github Pages on release (versioned)
if: ${{ github.ref_type == 'tag' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html/
destination_dir: ${{ github.ref_name }}
- name: Publish to Github Pages on release (stable)
if: ${{ github.ref_type == 'tag' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html/
destination_dir: stable
keep_files: false
- name: Update the versions switcher
if: ${{ github.ref_type == 'tag' }}
run: |
git checkout gh-pages
git fetch
git pull
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
python docs/update_version_json.py --version ${{ github.ref_name }}
git add versions.json
git commit -m "Update versions switcher"
git push
git checkout dev