Skip to content

Generate Repository Status #326

Generate Repository Status

Generate Repository Status #326

name: Generate Repository Status
on:
schedule:
- cron: "0 6 * * 1-5" # Every hour from 07:00 to 18:00, Monday to Friday
workflow_dispatch:
push:
branches:
- main
jobs:
generate-status:
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: "22"
- name: Install dependencies
run: npm ci
- name: Run TypeScript script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run build
npm run generate-status
- name: Commit and push changes
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git add ./profile/README.md
if ! git diff --cached --quiet; then
git commit -m "Update README.md"
git push
else
echo "No changes to commit"
fi