feat: add measure_array and discard_array quantum function (#710) #206
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 publish docs | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run | |
# in-progress and latest queued. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
env: | |
UV_VERSION: "0.4.27" | |
jobs: | |
build: | |
name: Build docs. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: ${{ env.UV_VERSION }} | |
enable-cache: true | |
- name: Build docs | |
run: | | |
cd docs | |
./build.sh | |
- name: Upload artifact. | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./docs/build/ | |
# Create an issue if building docs fails. | |
create-issue: | |
uses: CQCL/hugrverse-actions/.github/workflows/create-issue.yml@main | |
needs: build | |
if: always() && needs.build.result == 'failure' && github.event_name == 'push' | |
secrets: | |
GITHUB_PAT: ${{ secrets.HUGRBOT_PAT }} | |
with: | |
title: "💥 Doc builds fail on main" | |
body: | | |
The doc building workflow has failed on the main branch. | |
[Please investigate](https://github.com/CQCL/guppylang/actions/runs/${{ github.run_id }}). | |
unique-label: "docs-fail" | |
other-labels: "bug" | |
publish: | |
name: Publish docs. | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Deploy to GitHub Pages. | |
id: deployment | |
uses: actions/deploy-pages@v4 |