Skip to content

Have a trajectory learner example and reform the documentation build flow #8

Have a trajectory learner example and reform the documentation build flow

Have a trajectory learner example and reform the documentation build flow #8

Workflow file for this run

name: Docs
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PYTHON_VERSION: "3.10"
ref_backend: "finufft"
jobs:
makedocs:
name: Deploy API Documentation
runs-on: gpu
permissions:
contents: read
pages: read
issues: write
pull-requests: write
id-token: write
if: ${{ !contains(github.event.head_commit.message, 'docs_build')}}
steps:
- name: Create Comment with link
uses: mshick/add-pr-comment@v2
with:
message: Docs are generated, see here
- name: Checkout
uses: actions/checkout@v3
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
python -m pip install .[doc]
python -m pip install finufft
- name: Install GPU related interfaces
run: |
export CUDA_BIN_PATH=/usr/local/cuda-11.8/
export PATH=/usr/local/cuda-11.8/bin/:${PATH}
export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64/:${LD_LIBRARY_PATH}
pip install cupy-cuda11x
pip install torch --index-url https://download.pytorch.org/whl/cu118
python -m pip install gpuNUFFT cufinufft
- name: Build API documentation
run: |
python -m sphinx docs docs_build
- name: Display data
run: ls -R
working-directory: docs_build/_static
- name: Upload artifact
id: artifact-upload-step
uses: actions/upload-artifact@v4
with:
# Upload entire repository
path: 'docs_build'
retention-days: 10