Update Mod Source #4624
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: Update Mod Source | |
| on: | |
| schedule: | |
| - cron: "*/30 * * * *" # every 30 minutes - https://crontab.guru/every-30-minutes | |
| workflow_dispatch: {} | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: "mod-source-update" | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| update-mod-source: | |
| name: "Update Mod Source" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: "main" | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: scripts/update-mod-source-data/package-lock.json | |
| - name: Potentially Update Mod Source | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cd scripts/update-mod-source-data | |
| npm ci | |
| npm run update | |
| - name: Commit Version Bump | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| message: "source: Updated mod source data" | |
| push: true | |
| default_author: github_actions | |
| - name: Wait for push to propagate | |
| run: sleep 30 | |
| deploy: | |
| name: "Deploy Website" | |
| needs: update-mod-source | |
| uses: ./.github/workflows/deploy.yml |