Skip to content

ci: update GitHub Actions workflow for building and deploying documen… #4

ci: update GitHub Actions workflow for building and deploying documen…

ci: update GitHub Actions workflow for building and deploying documen… #4

Workflow file for this run

name: Build and Deploy Documentation
on:
push:
branches:
- main
permissions:
contents: write
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
pip install sphinx sphinx-rtd-theme
- name: Build Docs
run: |
cd docs
make html
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/_build/html
deploy:
needs: build-and-deploy
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }} # GitHub will automatically create the environment if it doesn't exist
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1