Skip to content

Merge pull request #88 from GameRoMan/fix-typos #24

Merge pull request #88 from GameRoMan/fix-typos

Merge pull request #88 from GameRoMan/fix-typos #24

Workflow file for this run

name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- main # Or your default branch
paths:
- 'docs/**' # Trigger only on changes within the docs directory
workflow_dispatch: # Allows manual triggering
# Required for GitHub Pages API deployment
permissions:
contents: read
pages: write # Needed to push to gh-pages branch
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # Use a specific version if needed, e.g., 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Assuming requirements are in docs/requirements.txt
if [ -f docs/requirements.txt ]; then
pip install -r docs/requirements.txt
else
echo "docs/requirements.txt not found, skipping dependency installation."
# Install Sphinx directly if no requirements file
pip install sphinx furo myst-parser sphinx-copybutton sphinx-click
fi
- name: Create .nojekyll file
run: |
touch docs/.nojekyll
- name: Build documentation
run: |
# Run make html inside the docs directory
make -C docs html
- name: Create .nojekyll file again
run: |
touch docs/_build/html/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html
deploy:
needs: build-docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4