Update Site #71
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 Site | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 1 * * 0' | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: 22.x | |
| - name: Install Deps | |
| run: npm ci | |
| - name: Build | |
| id: build | |
| run: | | |
| make -j4 | |
| if `git status -s | grep -q "index.html"`; then | |
| echo "::set-output name=updated::true"; | |
| else | |
| echo "::set-output name=updated::false"; | |
| fi | |
| - name: Commit | |
| if: steps.build.outputs.updated == 'true' | |
| uses: EndBug/add-and-commit@v8 | |
| with: | |
| message: 'chore: generate index.html with cronjob' | |
| add: index.html |