Skip to content

Build and Deploy Sphinx Docs #2

Build and Deploy Sphinx Docs

Build and Deploy Sphinx Docs #2

Workflow file for this run

name: Build and Deploy Sphinx Docs
on:
push:
branches:
- main # Change this to the branch you want to trigger the action on
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10' # Use the Python version you need
- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd docs
pip install -r requirements.txt
- name: Build the documentation
run: |
cd docs # Change this if your documentation is in a different directory
make html # Adjust if you use a different build command
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html # Adjust if your build output is in a different directory