Add automated documentation building

This commit is contained in:
zevaryx 2025-03-07 08:35:48 -07:00
parent 94d91974d1
commit 7de71713e6
2 changed files with 45 additions and 1 deletions

44
.github/workflows/docs.yml vendored Normal file
View file

@ -0,0 +1,44 @@
name: docs-builder
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.repository.fork == false
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.3"
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install the project
run: uv sync --all-extras --dev
- name: Build the docs
run: cd docs && uv run make html
- name: Upload the artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build
- name: Deploy to GH Pages
uses: actions/deploy-pages@v4

View file

@ -1,5 +1,5 @@
Welcome to the scryfall-py documentation! Welcome to the scryfall-py documentation!
===================================== =========================================
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2