fix format #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: Update project index | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "pages/**" | |
| - "scripts/generate-project-index.mjs" | |
| - ".github/workflows/update-project-index.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-project-index: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - run: node scripts/generate-project-index.mjs | |
| - name: Commit generated index | |
| run: | | |
| if git diff --quiet -- assets/data/projects.json assets/data/projects.js; then | |
| echo "Project index is already up to date." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add assets/data/projects.json assets/data/projects.js | |
| git commit -m "Update project index" | |
| git push |