Templatize index.html — auto-generate preview cards from JSON #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: Build Generator JAR | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'html-generators/generate.java' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - uses: jbangdev/setup-jbang@main | |
| - name: Build fat JAR | |
| run: jbang export fatjar --force --output html-generators/generate.jar html-generators/generate.java | |
| - name: Commit updated JAR | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add html-generators/generate.jar | |
| if git diff --cached --quiet; then | |
| echo "No changes to generate.jar" | |
| else | |
| git commit -m "Rebuild generate.jar from generate.java | |
| Auto-generated by build-generator workflow. | |
| Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" | |
| git push | |
| fi |