|
| 1 | +name: Generate Documentation |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + release: |
| 6 | + types: [published] |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + permissions: |
| 13 | + contents: write # release changes require contents write |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + #- run: ls ../../ |
| 17 | + - run: ls ../ |
| 18 | + #- run: ls ../CPWP-2023-TurbineCode |
| 19 | + - run: ls |
| 20 | + - name: Run Doxygen |
| 21 | + uses: mattnotmitt/doxygen-action@v1 |
| 22 | + with: |
| 23 | + # Path to Doxyfile |
| 24 | + doxyfile-path: ./docs/config/Doxyfile |
| 25 | + # Working directory |
| 26 | + #working-directory: doxygen |
| 27 | + - name: "Get Commit SHA Short" |
| 28 | + # See: https://stackoverflow.com/questions/58886293/getting-current-branch-and-commit-hash-in-github-action |
| 29 | + # See: https://github.com/Shippable/support/issues/3530 |
| 30 | + run: echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV |
| 31 | + - name: Upload HTML as Artifact |
| 32 | + uses: actions/upload-artifact@v4 |
| 33 | + with: |
| 34 | + # Name of the artifact to upload. |
| 35 | + # Optional. Default is 'artifact' |
| 36 | + # See: https://github.com/orgs/community/discussions/26965 |
| 37 | + # See: https://github.com/orgs/community/discussions/26370 |
| 38 | + name: "Doxygen-${{github.run_number}}_HTML-Documentation_${{github.event_name}}-${{github.ref_name}}_Commit-${{env.GITHUB_SHA_SHORT}}" |
| 39 | + |
| 40 | + # A file, directory or wildcard pattern that describes what to upload |
| 41 | + # Required. |
| 42 | + path: ./docs/doxygen-out/html |
| 43 | + |
| 44 | + # The desired behavior if no files are found using the provided path. |
| 45 | + # Available Options: |
| 46 | + # warn: Output a warning but do not fail the action |
| 47 | + # error: Fail the action with an error message |
| 48 | + # ignore: Do not output any warnings or errors, the action does not fail |
| 49 | + # Optional. Default is 'warn' |
| 50 | + if-no-files-found: error |
| 51 | + |
| 52 | + # Duration after which artifact will expire in days. 0 means using default retention. |
| 53 | + # Minimum 1 day. |
| 54 | + # Maximum 90 days unless changed from the repository settings page. |
| 55 | + # Optional. Defaults to repository settings. |
| 56 | + retention-days: 0 |
| 57 | + |
| 58 | + # The level of compression for Zlib to be applied to the artifact archive. |
| 59 | + # The value can range from 0 to 9. |
| 60 | + # For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads. |
| 61 | + # Optional. Default is '6' |
| 62 | + # compression-level: |
| 63 | + |
| 64 | + # If true, an artifact with a matching name will be deleted before a new one is uploaded. |
| 65 | + # If false, the action will fail if an artifact for the given name already exists. |
| 66 | + # Does not fail if the artifact does not exist. |
| 67 | + # Optional. Default is 'false' |
| 68 | + overwrite: true |
| 69 | + - name: Attach HTML to Release |
| 70 | + if: github.event_name == 'release' && success() || failure() |
| 71 | + env: |
| 72 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 73 | + run: | |
| 74 | + echo DEBUG - github.event_name = ${{github.event_name}} |
| 75 | + echo DEBUG - github.ref = ${{ github.ref }} |
| 76 | + echo DEBUG - github.ref_name = ${{github.ref_name}} |
| 77 | + cd ./docs/doxygen-out |
| 78 | + ls |
| 79 | + ls ../../ |
| 80 | + zip -r ../../CPWP-2025-26_Load_HTML_Documentation_${{github.event_name}}-${{github.ref_name}}_Commit-${{env.GITHUB_SHA_SHORT}}.zip ./html |
| 81 | + ls ../../ |
| 82 | + gh release upload ${{github.ref_name}} ../../CPWP-2025-26_Load_HTML_Documentation_${{github.event_name}}-${{github.ref_name}}_Commit-${{env.GITHUB_SHA_SHORT}}.zip |
| 83 | + - name: Upload RTF as Artifact |
| 84 | + uses: actions/upload-artifact@v4 |
| 85 | + with: |
| 86 | + # Name of the artifact to upload. |
| 87 | + # Optional. Default is 'artifact' |
| 88 | + name: "Doxygen-${{github.run_number}}_RTF-Documentation_${{github.event_name}}-${{github.ref_name}}_Commit-${{env.GITHUB_SHA_SHORT}}" |
| 89 | + |
| 90 | + # A file, directory or wildcard pattern that describes what to upload |
| 91 | + # Required. |
| 92 | + path: ./docs/doxygen-out/rtf |
| 93 | + |
| 94 | + # The desired behavior if no files are found using the provided path. |
| 95 | + # Available Options: |
| 96 | + # warn: Output a warning but do not fail the action |
| 97 | + # error: Fail the action with an error message |
| 98 | + # ignore: Do not output any warnings or errors, the action does not fail |
| 99 | + # Optional. Default is 'warn' |
| 100 | + if-no-files-found: error |
| 101 | + |
| 102 | + # Duration after which artifact will expire in days. 0 means using default retention. |
| 103 | + # Minimum 1 day. |
| 104 | + # Maximum 90 days unless changed from the repository settings page. |
| 105 | + # Optional. Defaults to repository settings. |
| 106 | + retention-days: 0 |
| 107 | + |
| 108 | + # The level of compression for Zlib to be applied to the artifact archive. |
| 109 | + # The value can range from 0 to 9. |
| 110 | + # For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads. |
| 111 | + # Optional. Default is '6' |
| 112 | + # compression-level: |
| 113 | + |
| 114 | + # If true, an artifact with a matching name will be deleted before a new one is uploaded. |
| 115 | + # If false, the action will fail if an artifact for the given name already exists. |
| 116 | + # Does not fail if the artifact does not exist. |
| 117 | + # Optional. Default is 'false' |
| 118 | + overwrite: true |
| 119 | + - name: Attach RTF to Release |
| 120 | + if: github.event_name == 'release' && success() || failure() |
| 121 | + env: |
| 122 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 123 | + run: | |
| 124 | + cd ./docs/doxygen-out |
| 125 | + ls |
| 126 | + ls ../../ |
| 127 | + zip -r ../../CPWP-2025-26_Load_RTF_Documentation_${{github.event_name}}-${{github.ref_name}}_Commit-${{env.GITHUB_SHA_SHORT}}.zip ./rtf |
| 128 | + ls ../../ |
| 129 | + gh release upload ${{github.ref_name}} ../../CPWP-2025-26_Load_RTF_Documentation_${{github.event_name}}-${{github.ref_name}}_Commit-${{env.GITHUB_SHA_SHORT}}.zip |
| 130 | + - run: mkdir pdf_output |
| 131 | + - run: ls |
| 132 | + #- run: ls ./docs |
| 133 | + #- run: ls ./docs/doxygen-out/latex |
| 134 | + #- run: make -f ./docs/latex/Makefile |
| 135 | + - name: Upload PDF as Artifact |
| 136 | + uses: actions/upload-artifact@v4 |
| 137 | + with: |
| 138 | + # Name of the artifact to upload. |
| 139 | + # Optional. Default is 'artifact' |
| 140 | + name: "Doxygen-${{github.run_number}}_PDF-Documentation_${{github.event_name}}-${{github.ref_name}}_Commit-${{env.GITHUB_SHA_SHORT}}" |
| 141 | + |
| 142 | + # A file, directory or wildcard pattern that describes what to upload |
| 143 | + # Required. |
| 144 | + path: pdf_output |
| 145 | + |
| 146 | + # The desired behavior if no files are found using the provided path. |
| 147 | + # Available Options: |
| 148 | + # warn: Output a warning but do not fail the action |
| 149 | + # error: Fail the action with an error message |
| 150 | + # ignore: Do not output any warnings or errors, the action does not fail |
| 151 | + # Optional. Default is 'warn' |
| 152 | + if-no-files-found: warn |
| 153 | + |
| 154 | + # Duration after which artifact will expire in days. 0 means using default retention. |
| 155 | + # Minimum 1 day. |
| 156 | + # Maximum 90 days unless changed from the repository settings page. |
| 157 | + # Optional. Defaults to repository settings. |
| 158 | + retention-days: 0 |
| 159 | + |
| 160 | + # The level of compression for Zlib to be applied to the artifact archive. |
| 161 | + # The value can range from 0 to 9. |
| 162 | + # For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads. |
| 163 | + # Optional. Default is '6' |
| 164 | + # compression-level: |
| 165 | + |
| 166 | + # If true, an artifact with a matching name will be deleted before a new one is uploaded. |
| 167 | + # If false, the action will fail if an artifact for the given name already exists. |
| 168 | + # Does not fail if the artifact does not exist. |
| 169 | + # Optional. Default is 'false' |
| 170 | + overwrite: true |
| 171 | + |
| 172 | + |
0 commit comments