Skip to content

Merge pull request #3 from GiorgioMedico/dev #5

Merge pull request #3 from GiorgioMedico/dev

Merge pull request #3 from GiorgioMedico/dev #5

Workflow file for this run

name: Documentation
on:
push:
branches: [ main, dev ]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'interpolatepy/**/*.py' # Only Python files for API docs
- '.github/workflows/docs.yml'
pull_request:
branches: [ main ]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'interpolatepy/**/*.py'
workflow_dispatch: # Allow manual triggering
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
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.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
- name: Build documentation
run: |
mkdocs build --clean --strict
- name: Setup Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/configure-pages@v4
- name: Upload artifact
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/upload-pages-artifact@v3
with:
path: ./site
deploy:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4