Enrich Project Data #155
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: Enrich Project Data | |
| on: | |
| schedule: | |
| # Run every day at 2 AM UTC | |
| - cron: "0 2 * * *" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'data/projects/*.toml' | |
| workflow_dispatch: # Allow manual triggers | |
| permissions: | |
| contents: write | |
| jobs: | |
| enrich: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run enrichment | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: pnpm run enrich | |
| - name: Rebuild search index | |
| run: pnpm run build:index | |
| - name: Commit changes | |
| run: | | |
| git config --local user.email "wbfoss.org@gmail.com" | |
| git config --local user.name "wbfossadmin" | |
| git add data/projects/*.toml public/index.json public/cache/*.json || true | |
| git diff --staged --quiet || git commit -m "chore: update project metadata and stars" | |
| git push | |
| continue-on-error: true | |
| - name: Ping sitemap to search engines | |
| run: | | |
| curl -X POST https://fossradar.dev/api/ping-sitemap \ | |
| -H "Content-Type: application/json" \ | |
| -H "x-api-key: ${{ secrets.ADMIN_API_KEY }}" || true | |
| continue-on-error: true |