ci: overhaul all GitHub Actions workflows to match criteria4s patterns #2
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: | |
| branches: [master] | |
| paths: | |
| - 'teckel-docs/**' | |
| - 'build.sbt' | |
| - '.github/workflows/docs.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| cache: sbt | |
| - uses: sbt/setup-sbt@v1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Compile mdoc | |
| run: sbt docs/mdoc | |
| - name: Install website dependencies | |
| working-directory: teckel-docs/website | |
| run: npm install | |
| - name: Build website | |
| working-directory: teckel-docs/website | |
| run: npm run build | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: teckel-docs/website/build | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |