Skip to content

add environment to docs yml #14

add environment to docs yml

add environment to docs yml #14

Workflow file for this run

name: Build and deploy docs
on:
push:
branches: [ main ]
pull_request:
permissions:
contents: read
pages: write
id-token: write
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Generate API docs
run: |
sphinx-apidoc -f -o docs/source/api src/longitudinal_ecg_analysis
- name: Build Sphinx docs
run: |
sphinx-build -W -b html docs/source docs/build/html
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html
deploy-pages:
if: github.ref == 'refs/heads/main'
needs: build-docs
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}$
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4