Update pre-commit to use ruff (#161) #112
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: docs | |
on: | |
push: | |
branches: [main] | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
docs-deploy: | |
if: github.ref == 'refs/heads/main' && github.repository == 'stfc/aiida-mlip' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
container: sphinxdoc/sphinx | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install poetry | |
run: | | |
apt update | |
apt upgrade -y | |
apt install -y pipx | |
pipx install poetry | |
- name: add deps | |
run: | | |
apt install -y python3-dev build-essential | |
- name: sphinx | |
run: | | |
export PATH="$HOME/.local/bin:$PATH" | |
poetry install --with docs | |
cd docs | |
poetry run make html | |
- name: upload | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload entire repository | |
path: './docs/build/html/.' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |