Some checks failed
website / build (push) Failing after 20s
This update modifies the pdoc workflow by adding git to the list of installed dependencies and incorporating a step to perform a `git pull`. The inclusion of git ensures that the latest version of the codebase is always used for generating documentation, enhancing the accuracy and relevance of the output. The change acknowledges the critical role of version control in continuous integration environments and aims to reduce discrepancies between the documentation and the codebase. By ensuring the documentation is always in sync with the latest code, this adjustment helps to prevent confusion and fosters better understanding and usage of the software by end users and contributors alike.
41 lines
859 B
YAML
41 lines
859 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 git
|
|
|
|
- name: Git pull
|
|
run: |
|
|
git pull
|
|
|
|
- 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
|
|
|