Reformat Python code with Ruff (#537) #13
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: Deploy Sphinx Documentation to GitHub Pages | |
on: | |
push: | |
branches: | |
- development # Adjust this to your default branch | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install system packages | |
run: | | |
sudo add-apt-repository universe multiverse | |
sudo apt update && sudo apt install enchant-2 libffi-dev libssl-dev libxml2-dev libxslt1-dev gettext libfreetype-dev libjpeg-dev | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
- name: Install Python dependencies | |
run: uv sync --only-group doc | |
working-directory: doc | |
- name: Build documentation | |
run: | | |
source ${GITHUB_WORKSPACE}/.venv/bin/activate | |
make html | |
working-directory: doc # Adjust to your Sphinx docs directory | |
- name: Copy CNAME if it exists | |
run: | | |
if [ -f CNAME ]; then cp CNAME doc/_build/html/; fi | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: doc/_build/html |