Skip to content

Build docs

Build docs #42

Workflow file for this run

name: documentation
on:
push:
branhces: gh-pages
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.11.6'
cache: 'pip'
- name: Add docs to path
run:
echo '/home/runner/work/materials_chempy/materials_chempy/docs' >> $GITHUB_PATH
- name: Install dependencies
run: |
cd /home/runner/work/materials_chempy/materials_chempy/docs
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Make file build
run: |
sphinx-build -M html /home/runner/work/materials_chempy/materials_chempy/docs/. /home/runner/work/materials_chempy/materials_chempy/docs/build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: /home/runner/work/materials_chempy/materials_chempy/docs/build/html
force_orphan: true