diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml deleted file mode 100644 index b23018e..0000000 --- a/.github/workflows/stats.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Update README Stats - -on: - schedule: - - cron: '0 0 * * *' # Runs every day at midnight - workflow_dispatch: - -jobs: - update-readme: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Fetch Data - run: | - echo "Fetching data for the past month..." - # Fetch commits for the last month - commits_last_month=$(git log --since="1 month ago" --pretty=format:"%an" | sort | uniq -c | sort -nr) - echo "Fetching data for the past week..." - # Fetch commits for the last week - commits_last_week=$(git log --since="1 week ago" --pretty=format:"%an" | sort | uniq -c | sort -nr) - echo "Fetching total commits..." - # Fetch total commits - total_commits=$(git log --pretty=format:"%an" | sort | uniq -c | sort -nr) - # Save stats to file - echo -e "## Commit Stats\n" > STATS.md - echo -e "### Last Month\n\`\`\`\n$commits_last_month\n\`\`\`\n" >> STATS.md - echo -e "### Last Week\n\`\`\`\n$commits_last_week\n\`\`\`\n" >> STATS.md - echo -e "### Total Commits\n\`\`\`\n$total_commits\n\`\`\`\n" >> STATS.md - - name: Update README - run: | - cat STATS.md >> README.md - - name: Commit and Push - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add README.md - git commit -m "Update README with latest stats" - git push