Trigger redeployment #3
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: | |
- main # Replace 'main' with your default branch if it's different | |
jobs: | |
build: | |
runs-on: windows-latest # Use a Windows environment for the build | |
steps: | |
# Step 1: Check out the repository | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# Step 2: Set up Python environment on Windows | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.10 # Match your local Python version (3.10.14) | |
# Step 3: Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install sphinx sphinx-book-theme | |
# Step 4: Build Sphinx documentation | |
- name: Build Sphinx Docs | |
run: | | |
sphinx-build -b html docs/source/ docs/_build/html | |
# Step 5: Deploy to GitHub Pages | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html |