[InMemoryDataset redesign] build_indices_and_offsets (#385) #82
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 and deploy docs to github pages | |
on: | |
push: | |
branches: ["master"] | |
release: | |
types: [published] | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# Cancel in-progress deployment jobs so only the latest one succeeds. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
benchmarks: | |
uses: ./.github/workflows/benchmarks.yml | |
build-and-deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: [benchmarks] | |
steps: | |
# Always checkout master branch, even if triggered by a tag. | |
# Otherwise sphinx-multiversion does not pull the master branch. | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Setup Graphviz | |
run: | | |
sudo apt update -y | |
sudo apt install graphviz libhdf5-dev mpi-default-dev -y | |
- name: Install versioned-hdf5 | |
run: | | |
pip install '.[doc,bench]' | |
- name: Update git tags for sphinx-multiversion | |
run: | | |
git fetch --tags | |
- name: Build docs | |
working-directory: docs | |
run: | | |
# Need to set timezone to avoid a sphinx/babel issue | |
# when using act to run locally: | |
# https://github.com/nektos/act/issues/1853 | |
TZ=UTC sphinx-multiversion . _build/html | |
# sphinx-multiversion only builds docs for every tag; | |
# this redirects users who visit ./index.html -> | |
# ./master/index.html, which is the development branch docs. | |
- name: Write redirect to development branch | |
run: | | |
echo "<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Redirecting to master branch</title> | |
<meta charset='utf-8'> | |
<meta http-equiv='refresh' content='0; url=./master/index.html'> | |
<link rel='canonical' href='./master/index.html'> | |
</head> | |
</html>" >> docs/_build/html/index.html | |
- name: Publish results | |
run: | | |
asv publish | |
- name: Move benchmarks to static pages | |
run: | | |
mv .asv/html docs/_build/html/benchmarks | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: 'docs/_build/html' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |