plankapy/.forgejo/workflows/pdoc.yml
Kumi a0cc7a742b
Some checks failed
website / build (push) Failing after 20s
feat: optimize pdoc workflow and deps installation
Reworked the Python dependency installation step in the `.forgejo/workflows/pdoc.yml` workflow file to install from the current directory (`.`) instead of specifying packages directly. This adjustment ensures that local package dependencies are correctly resolved and installed, aligning with best practices for Python projects. Additionally, streamlined the documentation generation process by modifying the `pdoc` execution command to use the package's dot notation, improving clarity and consistency in how the `pdoc` tool is invoked for generating Markdown documentation.

This change enhances the maintainability of our documentation workflow and ensures that our environment mirrors production more closely, potentially reducing the occurrence of "works on my machine" issues.
2024-04-25 08:58:31 +02:00

36 lines
797 B
YAML

name: website
# build the documentation whenever there are new commits on main
on:
push:
branches:
- main
# Alternative: only build for tags.
# tags:
# - '*'
workflow_dispatch:
## security: restrict permissions for CI jobs.
permissions:
contents: read
jobs:
# Build the documentation and upload the static HTML files as an artifact.
build:
container:
image: node:20-bookworm
steps:
- name: Install dependencies
run: |
apt update
apt install -y python3 python3-pip
- name: Install Python dependencies
run: |
pip install pdoc . --break-system-packages
- run: python3 -m pdoc -d markdown -o docs plankapy
- uses: forgejo/upload-artifact@v4
with:
path: docs