From 9843063ad4e74a3b83c00d8a37384d8b458412b3 Mon Sep 17 00:00:00 2001 From: ~hedy Date: Wed, 8 May 2024 12:29:23 +0800 Subject: [PATCH] chore: format robots.txt.yml with prettier (#21) --- .github/workflows/robots.txt.yml | 49 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/.github/workflows/robots.txt.yml b/.github/workflows/robots.txt.yml index f814daf..5a21a2a 100644 --- a/.github/workflows/robots.txt.yml +++ b/.github/workflows/robots.txt.yml @@ -1,34 +1,33 @@ name: "Update robots.txt" on: - schedule: - - cron: "0 0 * * 6" # At 00:00 on Saturday - workflow_dispatch: + schedule: + - cron: "0 0 * * 6" # At 00:00 on Saturday + workflow_dispatch: jobs: - update: - name: "Update robots.txt" + update: + name: "Update robots.txt" - runs-on: ubuntu-latest + runs-on: ubuntu-latest - permissions: - contents: write + permissions: + contents: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 + steps: + - name: Checkout repository + uses: actions/checkout@v4 - - name: Pull latest robots - run: | - curl -X POST https://api.darkvisitors.com/robots-txts \ - -H "Authorization: Bearer ${{ secrets.DarkVisitorsBearer }}" \ - -H "Content-Type: application/json" \ - --data-raw '{"agent_types": ["AI Assistant", "AI Data Scraper", "AI Search Crawler", "Undocumented AI Agent"]}' \ - --output ./public/robots.txt - - - name: Commit changes - uses: EndBug/add-and-commit@v9 - with: - message: "chore: generate robots.txt" - default_author: github_actions - push: true + - name: Pull latest robots + run: | + curl -X POST https://api.darkvisitors.com/robots-txts \ + -H "Authorization: Bearer ${{ secrets.DarkVisitorsBearer }}" \ + -H "Content-Type: application/json" \ + --data-raw '{"agent_types": ["AI Assistant", "AI Data Scraper", "AI Search Crawler", "Undocumented AI Agent"]}' \ + --output ./public/robots.txt + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + message: "chore: generate robots.txt" + default_author: github_actions + push: true