Skip to content

Update robots.txt

Update robots.txt #65

Workflow file for this run

name: Update robots.txt
on:
schedule:
- cron: "0 7 * * *" # Runs daily at 7 AM UTC
workflow_dispatch: # Allows manual triggering
permissions:
contents: write # Required to push changes
jobs:
update-robots:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Update robots.txt
run: npm run update-robots
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add src/pages/robots.txt.ts
git diff --quiet && git diff --staged --quiet || git commit -m "chore: update robots.txt"
- name: Push changes
run: git push