This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
Add the link to the pytket-cutensornet docs (#519) #489
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: publish docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
docs: | |
name: Build and publish docs | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install pip, wheel | |
run: pip install -U pip wheel | |
- name: Install docs dependencies | |
run: | | |
pip install -r .github/workflows/docs/requirements.txt | |
- name: Build docs | |
timeout-minutes: 20 | |
run: | | |
cd .github/workflows/docs | |
mkdir extensions | |
./build-docs -a -i -d ${GITHUB_WORKSPACE}/.github/workflows/docs/extensions | |
- name: Configure git | |
run: | | |
git config --global user.email "tket-bot@cambridgequantum.com" | |
git config --global user.name "«$GITHUB_WORKFLOW» github action" | |
- name: Check out gh-pages branch | |
run: git checkout gh-pages | |
- name: Remove old docs | |
run: git rm -r --ignore-unmatch docs/api | |
- name: Add generated docs to repository | |
run: | | |
mkdir -p docs | |
mv .github/workflows/docs/extensions docs/api | |
git add -f docs/api | |
git commit --allow-empty -m "Add generated documentation." | |
- name: Publish docs | |
run: git push origin gh-pages:gh-pages |