Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Update Contributors #68

Update Contributors

Update Contributors #68

name: Update Contributors
on:
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # Run weekly on Sunday at midnight
jobs:
update-contributors:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Fetch contributors
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd docs-svelte
chmod +x scripts/fetch-contributors.js
node scripts/fetch-contributors.js
- name: Commit changes if any
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add docs-svelte/static/data/contributors.json
git diff --staged --quiet || git commit -m "chore: update contributors list"
git push