|
| 1 | +name: Build and Publish |
| 2 | + |
| 3 | +on: |
| 4 | + # Allows running this workflow manually from the Actions tab |
| 5 | + workflow_dispatch: |
| 6 | + inputs: |
| 7 | + version: |
| 8 | + description: "Version of Slicer documentation to build and publish" |
| 9 | + required: true |
| 10 | + |
| 11 | +jobs: |
| 12 | + build-and-publish: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - name: Collect Inputs |
| 16 | + id: collect_inputs |
| 17 | + run: | |
| 18 | + echo "EVENT_NAME [$EVENT_NAME]" |
| 19 | + if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then |
| 20 | + version=${{ github.event.inputs.version }} |
| 21 | + else |
| 22 | + echo "::error ::Unsupported EVENT_NAME [$EVENT_NAME]" |
| 23 | + exit 1 |
| 24 | + fi |
| 25 | + echo "version=$version" >> $GITHUB_OUTPUT |
| 26 | + env: |
| 27 | + EVENT_NAME: ${{ github.event_name }} |
| 28 | + |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + ref: gh-pages |
| 32 | + path: gh-pages |
| 33 | + |
| 34 | + - uses: actions/checkout@v4 |
| 35 | + with: |
| 36 | + repository: jcfr/Slicer |
| 37 | + path: Slicer |
| 38 | + ref: speedup-doxygen-generation # ${{ steps.collect_inputs.outputs.version }} |
| 39 | + |
| 40 | + - uses: ssciwr/doxygen-install@v1 |
| 41 | + with: |
| 42 | + version: "1.10.0" |
| 43 | + |
| 44 | + # The "dot" binary is provided by Graphviz |
| 45 | + - name: Setup Graphviz |
| 46 | + uses: ts-graphviz/setup-graphviz@v2 |
| 47 | + |
| 48 | + - uses: actions/checkout@v4 |
| 49 | + with: |
| 50 | + repository: Slicer/slicer-apidocs-builder |
| 51 | + path: slicer-apidocs-builder |
| 52 | + ref: 1744509e91fa66186d34e4c6968ee684131c51d1 |
| 53 | + |
| 54 | + - uses: actions/setup-python@v5 |
| 55 | + with: |
| 56 | + python-version: '3.13' |
| 57 | + cache: 'pip' |
| 58 | + |
| 59 | + - name: Install slicer-apidocs-builder |
| 60 | + run: | |
| 61 | + pip install ./slicer-apidocs-builder |
| 62 | +
|
| 63 | + - name: Build |
| 64 | + run: | |
| 65 | + slicer-apidocs-builder \ |
| 66 | + --slicer-repo-dir Slicer \ |
| 67 | + --slicer-repo-branch $SLICER_BRANCH \ |
| 68 | + --skip-publish |
| 69 | + env: |
| 70 | + SLICER_BRANCH: speedup-doxygen-generation # ${{ steps.collect_inputs.outputs.version }} |
| 71 | + |
0 commit comments