Skip to content

CI: Add dbg printing to find issue with linking to source code on tes… #4

CI: Add dbg printing to find issue with linking to source code on tes…

CI: Add dbg printing to find issue with linking to source code on tes… #4

Workflow file for this run

name: Docs Pages Deployment CI
on:
push:
branches: [ main, test-docs-deployment ]
workflow_dispatch:
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Print out github ref info
run: |
echo "repository = ${{ github.repository }}"
echo "event_name = ${{ github.event_name }}"
echo "ref = ${{ github.ref }}"
echo "ref_name = ${{ github.ref_name }}"
echo "head_ref = ${{ github.head_ref }}"
echo "base_ref = ${{ github.base_ref }}"
echo "sha = ${{ github.sha }}"
echo "GITHUB_REF = ${GITHUB_REF}"
echo "GITHUB_REF_NAME = ${GITHUB_REF_NAME}"
echo "GITHUB_SHA = ${GITHUB_SHA}"
echo "--- git state ---"
git rev-parse --abbrev-ref HEAD
git rev-parse HEAD
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install -v ".[test]"
python -m pip install ruff==0.13.1
python -m pip install -r .github/constraints/deps.txt
- name: lint
run: |
ruff check
- name: lint and build docs
run: |
numpydoc lint src/gfdl/model.py src/gfdl/activations.py src/gfdl/weights.py
cd docs && make html SPHINXOPTS="-W --keep-going"
- name: test
run: |
cd $RUNNER_TEMP
python -m pytest --pyargs gfdl --cov=gfdl --cov-report=term-missing
# needed for pages deployment from the main or the deployment test branch
- name: upload pages artifacts
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html
# deploy for push events on the main or deployment test branch
deploy:
runs-on: ubuntu-latest
needs: build-docs
permissions:
pages: write
id-token: write
environment:
name: github-pages
steps:
- uses: actions/deploy-pages@v4