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