Update documentation #31
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: pip | |
- name: Run pre-commit | |
uses: pre-commit/action@v3.0.0 | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
# - windows-latest Reason: get it running on ubuntu-latest first | |
# - macOS-latest Reason: get it running on ubuntu-latest first | |
python-version: ["3.11",] | |
name: Run tests | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install thermontfa | |
run: pip install .[dev] | |
- name: Run pytest | |
run: | | |
pip install pytest | |
pytest -v | |
docs: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
# - windows-latest Reason: get it running on ubuntu-latest first | |
# - macOS-latest Reason: get it running on ubuntu-latest first | |
python-version: ["3.11",] | |
name: Build and publish Documentation | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pandoc | |
#uses: docker://pandoc/core:2.9 | |
run: | | |
sudo apt update | |
sudo apt install pandoc -y | |
- name: Install thermontfa | |
run: pip install .[dev] | |
- name: Build documentation | |
run: | | |
cd docs | |
TZ=UTC make html | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: html-docs | |
path: docs/build/html/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/build/html |