Build and Deploy Sphinx Docs #2
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: 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 |