Add project: Community Infrastructure Management Portal (#1168) #1000
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 index & generate thumbnails | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "Projects/**" | |
| - ".github/scripts/generate-index.mjs" | |
| - ".github/workflows/index-projects.yml" | |
| - "gen-svgs.js" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Generate projects.json | |
| run: node .github/scripts/generate-index.mjs | |
| - name: Install Puppeteer (skip Chrome download) | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: "true" | |
| run: npm install puppeteer --no-save | |
| - name: Generate / update thumbnails | |
| env: | |
| PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome | |
| run: node gen-svgs.js | |
| - name: Commit index + thumbnails | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add projects.json assets/thumbs/ | |
| if [[ -n "$(git status --porcelain)" ]]; then | |
| git commit -m "chore: rebuild index + thumbnails [skip ci]" | |
| git push | |
| else | |
| echo "Nothing to commit — index and thumbnails are already up to date." | |
| fi |