Skip to content

Update Projects JSON #12

Update Projects JSON

Update Projects JSON #12

Workflow file for this run

name: Refresh GitHub Data
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC
workflow_dispatch: # Allow manual triggers
push:
paths:
- 'src/config.js' # Run when config is updated
jobs:
refresh-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Fetch GitHub data
run: npm run fetch-data
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Commit updated data
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add public/projects.json
git commit -m "Update projects data" || echo "No changes to commit"
git push