-
Notifications
You must be signed in to change notification settings - Fork 56
49 lines (46 loc) · 1.43 KB
/
docs.yaml
File metadata and controls
49 lines (46 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build docs
on: push
jobs:
build:
name: Build Docs
runs-on: ubuntu-latest
# We only execute this step if the commit is tagged, i.e., this is a release
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Build docs
uses: actions/setup-python@master
with:
python-version: "3.12"
# We *need* to install projectq to generate documentation
# This is needed because sphinx analyzes SimulaQron's code to generate the HTML;
# this implies that the modules are imported (but not executed), which therefore
# imports projectq classes.
- name: Install simulaqron and build docs
run: |
make install-optional
cd docs
make install-deps
make build
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v4
with:
path: docs/build/html/
deploy:
name: Deploy docs
needs: build
runs-on: ubuntu-latest
# We only execute this step if the commit is tagged, i.e., this is a release
if: startsWith(github.ref, 'refs/tags')
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4