Skip to content

Create API documentation action workflow #1

Create API documentation action workflow

Create API documentation action workflow #1

Workflow file for this run

name: generate-api-docs
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install .
- run: pip install pdoc
- run: pdoc --output-dir apidocs solrizer
- uses: actions/upload-pages-artifact@v3
with:
path: apidocs
# Deploy job
deploy:
# Add a dependency to the build job
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4