Skip to content

Finalize README and configure codecov hooks (#97) #22

Finalize README and configure codecov hooks (#97)

Finalize README and configure codecov hooks (#97) #22

Workflow file for this run

name: Build docs
on:
workflow_dispatch:
push:
branches: [main]
# set GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build-docs:
if: github.repository_owner == 'Radical-AI' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Install pandoc
run: sudo apt-get install pandoc
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up uv
uses: astral-sh/setup-uv@v2
- name: Install dependencies
run: |
uv pip install .[test,docs] --system
- name: Install mace
run: uv pip install mace-torch --system
- name: Copy tutorials
run: |
cp -r examples/tutorials docs/
jupytext --set-formats "py:percent,ipynb" docs/tutorials/*.py
jupytext --set-kernel python3 docs/tutorials/*.py
jupytext --to notebook --execute docs/tutorials/*.py
rm docs/tutorials/*.py
rm docs/tutorials/*.h5*
rm docs/tutorials/*.traj*
- name: Build
run: sphinx-build docs docs_build
- name: Upload build artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs_build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build-docs
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4