ci: Use geometric digitization in Examples #31651
Workflow file for this run
This file contains hidden or 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: Docs | |
| on: | |
| push: | |
| pull_request: | |
| branches: | |
| - main | |
| - 'release/**' | |
| - 'develop/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| env: | |
| DOXYGEN_WARN_AS_ERROR: FAIL_ON_WARNINGS | |
| DOXYGEN_VERSION: "1.15.0" | |
| DOXYGEN_HASH: "0ec2e5b2c3cd82b7106d19cb42d8466450730b8cb7a9e85af712be38bf4523a1" | |
| LINKCHECK_IGNORE_URL: "https://github.com/acts-project/linkcheck-ignore/raw/refs/heads/main/data.json" | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Install doxygen | |
| run: | | |
| curl -SL https://acts.web.cern.ch/ci/doxygen/doxygen-${{ env.DOXYGEN_VERSION }}.linux.bin.tar.gz -o doxygen-${{ env.DOXYGEN_VERSION }}.linux.bin.tar.gz | |
| echo "${{ env.DOXYGEN_HASH }} doxygen-${{ env.DOXYGEN_VERSION }}.linux.bin.tar.gz" | sha256sum -c - | |
| tar xf doxygen-${{ env.DOXYGEN_VERSION }}.linux.bin.tar.gz | |
| mv doxygen-${{ env.DOXYGEN_VERSION }}/bin/doxygen /usr/local/bin/doxygen | |
| - name: Install APT packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y graphviz texlive-bibtex-extra libeigen3-dev libboost-dev cmake | |
| - name: Configure | |
| run: > | |
| cmake -B build -S . -DACTS_BUILD_DOCS=ON | |
| - name: Build documentation | |
| run: > | |
| cmake --build build --target docs | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| - name: Check documentation links | |
| run: | | |
| docs/check_links.sh | |
| - name: Generate PR metadata | |
| if: github.event_name == 'pull_request' | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| PR_BRANCH: ${{ github.head_ref }} | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| run: | | |
| jq -n \ | |
| --arg pr "$PR_NUMBER" \ | |
| --arg branch "$PR_BRANCH" \ | |
| --arg title "$PR_TITLE" \ | |
| --arg url "$PR_URL" \ | |
| '{pr: ($pr | tonumber), branch: $branch, title: $title, url: $url}' \ | |
| > build/docs/html/pr.json | |
| echo "Created pr.json for PR #$PR_NUMBER" | |
| cat build/docs/html/pr.json | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| id: artifact-upload-step | |
| with: | |
| name: acts-docs | |
| path: build/docs/html | |
| - name: Documentation display | |
| env: | |
| REPOSITORY: ${{ github.repository }} | |
| ARTIFACT_ID: ${{ steps.artifact-upload-step.outputs.artifact-id }} | |
| run: | | |
| base_link="https://acts-herald.app.cern.ch/view/${REPOSITORY}/${ARTIFACT_ID}" | |
| link="$base_link/index.html" | |
| echo "📚 Docs preview available at: $link" | |
| echo "**📚 Documentation preview available [here]($link)**" >> $GITHUB_STEP_SUMMARY | |
| # prime cache | |
| (curl -L -m1 "$link" "$base_link/pr.json" > /dev/null 2>&1) || true | |
| - name: Repository Dispatch | |
| # Dispatch only if on a tag or on the main branch | |
| if: >- | |
| ${{ | |
| github.event_name == 'push' && | |
| ( | |
| github.ref_type == 'tag' || | |
| (github.ref_type == 'branch' && github.ref_name == 'main') | |
| ) | |
| }} | |
| uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1 | |
| with: | |
| token: ${{ secrets.DOCS_DEPLOY_TOKEN }} | |
| repository: acts-project/acts-project.github.io | |
| event-type: deploy_docs | |
| client-payload: ${{ format('{{"source_repo":{0},"run_id":{1},"artifact_id":{2},"ref":{3},"ref_type":{4},"ref_name":{5},"sha":{6}}}', toJson(github.repository), toJson(github.run_id), toJson(steps.artifact-upload-step.outputs.artifact-id), toJson(github.ref), toJson(github.ref_type), toJson(github.ref_name), toJson(github.sha)) }} |