Skip to content

[SCHEMATIC-30, SCHEMATIC-200] Add version to click cli / use pathlib.… #309

[SCHEMATIC-30, SCHEMATIC-200] Add version to click cli / use pathlib.…

[SCHEMATIC-30, SCHEMATIC-200] Add version to click cli / use pathlib.… #309

Workflow file for this run

name: pdoc
# build the documentation whenever there are new commits on main
on:
push:
branches:
- develop
workflow_dispatch: # Allow manually triggering the workflow
# security: restrict permissions for CI jobs.
permissions:
contents: read
concurrency:
# cancel the current running workflow from the same branch, PR when a new workflow is triggered
# when the trigger is not a PR but a push, it will use the commit sha to generate the concurrency group
# {{ github.workflow }}: the workflow name is used to generate the concurrency group. This allows you to have more than one workflows
# {{ github.ref_type }}: the type of Git ref object created in the repository. Can be either branch or tag
# {{ github.event.pull_request.number}}: get PR number
# {{ github.sha }}: full commit sha
# credit: https://github.com/Sage-Bionetworks-Workflows/sagetasks/blob/main/.github/workflows/ci.yml
group: >-
${{ github.workflow }}-${{ github.ref_type }}-
${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
POETRY_VERSION: 1.3.0
PYTHON_VERSION: "3.10"
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
#----------------------------------------------
# install & configure poetry
#----------------------------------------------
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org \
| python3 - --version ${{ env.POETRY_VERSION }};
poetry config virtualenvs.create true;
poetry config virtualenvs.in-project true;
#----------------------------------------------
# install dependencies and root project
#----------------------------------------------
- name: Install dependencies and root project
run: poetry install --no-interaction --all-extras
# create documentation
- run: poetry add [email protected]
- run: poetry show pdoc
- run: poetry run pdoc --docformat google --mermaid -o docs/schematic schematic/manifest schematic/models schematic/schemas schematic/store schematic/utils schematic/visualization
- uses: actions/upload-pages-artifact@v3
with:
path: docs/schematic
name: github-pages
# Deploy the artifact to GitHub pages.
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4