Update workflows and stuff #12
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: Extract Meteorist Info to Website | |
| on: [push, workflow_dispatch] | |
| jobs: | |
| extract-meteorist-info: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: Set up Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Make Gradle Executable | |
| run: chmod +x ./gradlew | |
| - name: Run MeteoristInfoParser | |
| run: ./gradlew generateMeteoristInfo | |
| - name: Create output directory | |
| run: mkdir -p website/generated | |
| - name: Copy Meteorist Info to website/generated | |
| run: cp build/info/meteorist-info.json website/generated/meteorist-info.json | |
| - name: Commit and push to main | |
| run: | | |
| git config user.name "GitHub Action" | |
| git config user.email "action@github.com" | |
| git add website/generated/meteorist-info.json | |
| if ! git diff --cached --quiet; then | |
| git commit -m "chore: update Meteorist info [automated]" | |
| git push origin HEAD:refs/heads/main | |
| fi |