Adding GitHub Action

This commit is contained in:
Adam Newbold 2024-08-01 18:17:19 -04:00
parent 17a84f2c2d
commit 1fdc79dacb
3 changed files with 244 additions and 0 deletions

25
.github/workflows/main.yml vendored Normal file
View file

@ -0,0 +1,25 @@
on: [push]
jobs:
ai-robots-txt:
runs-on: ubuntu-latest
name: ai-robots-txt
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- run: |
git config --global user.name "ai.robots.txt"
git config --global user.email "ai.robots.txt@users.noreply.github.com"
git rm robots.txt
git rm table-of-bot-metrics.md
git add -A
git commit -m "Removing previously generated files"
git push
php -f code/action.php
git config --global user.name "ai.robots.txt"
git config --global user.email "ai.robots.txt@users.noreply.github.com"
git add -A
git commit -m "${{ github.event.head_commit.message }}"
git push
shell: bash