Skip to content

Fetch and save robots.txt #8

Fetch and save robots.txt

Fetch and save robots.txt #8

Workflow file for this run

name: "Fetch and save robots.txt"
on:
workflow_dispatch:
schedule:
- cron: '0 16 * * 1' # * 16:00 UTC +08:00 Mondays
jobs:
process:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Push changes
run: |
curl https://raw.githubusercontent.com/ai-robots-txt/ai.robots.txt/refs/heads/main/robots.txt > robots.txt
git config user.email "[email protected]"
git config user.name "guardian [bot]"
git add robots.txt
git commit -m "Update robots.txt" || echo "Nothing changed in ai-robots-txt.txt"
git fetch origin main
git push origin HEAD:main