Merge pull request #2443 from neutrinoceros/docs/fix_broken_urls #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build low-level API docs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
api-docs: | |
runs-on: ubuntu-latest | |
env: | |
HDF5_VERSION: 1.12.0 | |
HDF5_DIR: ${{ github.workspace }}/cache/hdf5 | |
TOXENV: apidocs | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache HDF5 | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.HDF5_DIR }} | |
key: ${{ runner.os }}-hdf5-${{ env.HDF5_VERSION }} | |
- name: Build HDF5 | |
run: | | |
./ci/get_hdf5_if_needed.sh | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Install tox | |
run: | | |
python -m pip install --upgrade pip | |
python3 -m pip install tox | |
- name: Build API docs | |
run: | | |
tox | |
echo -n "api.h5py.org" > docs_api/_build/html/CNAME | |
- name: Upload built docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs-html | |
path: docs_api/_build/html | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
if: github.repository == 'h5py/h5py' && github.ref == 'refs/heads/master' && github.event_name == 'push' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs_api/_build/html |