Skip to content

Merge pull request #50 from ipsitdebnath/Ipsit #63

Merge pull request #50 from ipsitdebnath/Ipsit

Merge pull request #50 from ipsitdebnath/Ipsit #63

Workflow file for this run

name: Build Contributors Data
on:
push:
branches:
- main
paths:
- 'contributors/**'
pull_request:
branches:
- main
paths:
- 'contributors/**'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build data.json
run: npm run build
- name: Check for changes
id: git-check
run: |
git diff --exit-code data.json || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit and push if changed
if: steps.git-check.outputs.changed == 'true' && github.event_name == 'push'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add data.json
git commit -m "🤖 Auto-update data.json from contributors"
git push