|
| 1 | +name: Documentation |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + tags: ["*"] |
| 8 | + |
| 9 | + repository_dispatch: |
| 10 | + types: [tagbot-release-created] |
| 11 | + |
| 12 | +concurrency: |
| 13 | + # Skip intermediate builds: always. |
| 14 | + # Cancel intermediate builds: only if it is a pull request build. |
| 15 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 16 | + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} |
| 17 | +jobs: |
| 18 | + docs: |
| 19 | + name: Documentation |
| 20 | + runs-on: ubuntu-latest |
| 21 | + timeout-minutes: 30 |
| 22 | + permissions: |
| 23 | + contents: write |
| 24 | + statuses: write |
| 25 | + env: |
| 26 | + DOC_TEMPLATE_VERSION: "v0.7.0" # Change this to the specific tag version you want |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v7 |
| 29 | + - uses: julia-actions/setup-julia@v3 |
| 30 | + - uses: julia-actions/cache@v3 |
| 31 | + - name: Use Documentation Template |
| 32 | + run: | |
| 33 | + ./docs/get_docs_utils.sh ${{ env.DOC_TEMPLATE_VERSION }} |
| 34 | + - uses: julia-actions/julia-buildpkg@v1 |
| 35 | + - uses: julia-actions/julia-docdeploy@v1 |
| 36 | + env: |
| 37 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 38 | + - name: Upload documentation artifacts |
| 39 | + uses: actions/upload-artifact@v6 |
| 40 | + with: |
| 41 | + name: documentation-build |
| 42 | + path: docs/build/ |
| 43 | + retention-days: 1 |
| 44 | + - run: | |
| 45 | + julia --project=docs -e ' |
| 46 | + using Documenter: DocMeta, doctest |
| 47 | + using Intonato |
| 48 | + DocMeta.setdocmeta!(Intonato, :DocTestSetup, :(using Intonato); recursive=true) |
| 49 | + doctest(Intonato)' |
| 50 | +
|
| 51 | + tagbot-dispatch: |
| 52 | + name: Dispatch on TagBot Release |
| 53 | + runs-on: ubuntu-latest |
| 54 | + needs: docs |
| 55 | + if: github.event_name == 'repository_dispatch' |
| 56 | + steps: |
| 57 | + - name: Dispatch PiccoloMultiDocs workflow |
| 58 | + uses: peter-evans/repository-dispatch@v4 |
| 59 | + with: |
| 60 | + token: ${{ secrets.REPO_ACCESS_TOKEN }} |
| 61 | + repository: harmoniqs/PiccoloMultiDocs.jl |
| 62 | + event-type: rebuild-docs |
| 63 | + |
| 64 | + tag-push-dispatch: |
| 65 | + name: Dispatch on Tag Push |
| 66 | + runs-on: ubuntu-latest |
| 67 | + needs: docs |
| 68 | + if: github.ref_type == 'tag' |
| 69 | + steps: |
| 70 | + - name: Dispatch PiccoloMultiDocs workflow |
| 71 | + uses: peter-evans/repository-dispatch@v4 |
| 72 | + with: |
| 73 | + token: ${{ secrets.REPO_ACCESS_TOKEN }} |
| 74 | + repository: harmoniqs/PiccoloMultiDocs.jl |
| 75 | + event-type: rebuild-docs |
0 commit comments