Skip to content

Merge pull request #213 from timcallow/pypi_logo_fix #629

Merge pull request #213 from timcallow/pypi_logo_fix

Merge pull request #213 from timcallow/pypi_logo_fix #629

Workflow file for this run

name: docs
on:
pull_request:
branches:
- master
- develop
push:
branches:
- master
- develop
jobs:
python-style-checks:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Install dependencies
run: pip install -qU pydocstyle flake8
- name: Check docstrings
run: pydocstyle --convention=numpy atoMEC
- name: Lint with flake8
run: flake8 atoMEC --count --show-source --statistics
build-and-deploy-pages:
needs: python-style-checks
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Install dependencies
run: |
pip install -q -r docs/requirements.txt
- name: Build API and docs
run: |
sphinx-apidoc -o docs/source/api atoMEC
sphinx-build -W --keep-going -b html -d docs/_build/doctrees docs/source docs/_build/html
mv -v docs/_build/html public
- name: Deploy
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./public