Jesse interface thesis proj #380
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: | |
| workflow_dispatch: | |
| workflow_call: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: "pages-${{ github.ref }}" | |
| cancel-in-progress: false | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - uses: coursier/cache-action@v6 | |
| with: | |
| extraMillFiles: '**/*.mill' | |
| ignoreJob: true | |
| ignoreMatrix: true | |
| - uses: actions/cache@v4 | |
| with: | |
| path: out | |
| key: | | |
| build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-${{ hashFiles('**/*.scala') }} | |
| restore-keys: | | |
| build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}- | |
| build-${{ runner.os }}- | |
| build- | |
| - run: sudo apt-get update | |
| - run: sudo apt-get -y install latexmk texlive-latex-recommended texlive-lang-japanese texlive-latex-extra texlive-extra-utils poppler-utils | |
| - run: | | |
| ./mill -i allDocs | |
| echo "dir=$(realpath out/allDocs.dest/BASIL)" >> "$GITHUB_OUTPUT" | |
| id: allDocs | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ${{ steps.allDocs.outputs.dir }} | |
| # TODO: This excludes the ExitCode warning from decline. Remove after https://github.com/typelevel/cats-effect/issues/4532 | |
| - run: | | |
| ! grep -v effect/shared/src/main/scala/com/monovore/decline/effect/CommandIOApp out/scalaDocGenerated.log | grep --after-context=3 'Error\|Warning' | |
| name: check for scaladoc warnings | |
| - id: docArgs | |
| run: echo "args=$(.github/workflows/check-doc-links.sh)" >> "$GITHUB_OUTPUT" | |
| env: | |
| LYCHEE_EXPORT_ARGS: "true" | |
| - uses: lycheeverse/lychee-action@v2 | |
| id: lychee | |
| with: | |
| args: ${{ steps.docArgs.outputs.args}} | |
| fail: false | |
| failIfEmpty: true | |
| jobSummary: false | |
| - name: >- | |
| $lychee_exit_code == 0 | |
| run: | | |
| sed -i.bak 's|${{ steps.allDocs.outputs.dir }}||g' lychee/out.md | |
| cat lychee/out.md | |
| if ! [[ "$lychee_exit_code" == 0 ]]; then | |
| cat lychee/out.md >> "$GITHUB_STEP_SUMMARY" | |
| exit "$lychee_exit_code" | |
| fi | |
| env: | |
| lychee_exit_code: ${{ steps.lychee.outputs.exit_code }} | |
| deploy-docs: | |
| if: github.ref_name == 'main' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build-docs | |
| steps: | |
| - uses: actions/deploy-pages@v4 | |
| id: deployment |