|
56 | 56 | env: |
57 | 57 | MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }} |
58 | 58 | run: | |
59 | | - latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) |
| 59 | + latest_tag=$(git tag --sort=-v:refname | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -1) |
60 | 60 | mike deploy --push --update-aliases $latest_tag latest |
| 61 | +
|
| 62 | + # IndexNow key: 0d5d9799b1cc4a39825146388c6781eb |
| 63 | + # This key must stay in sync across three files: |
| 64 | + # docs/0d5d9799b1cc4a39825146388c6781eb.txt (key file served at site root) |
| 65 | + # docs/theme/main.html (indexnow-key meta tag) |
| 66 | + # this workflow (inject step + notify step below) |
| 67 | + # Bing/Yandex fetch https://supervision.roboflow.com/<key>.txt to verify ownership. |
| 68 | + # Do NOT rename or delete the .txt file or change the key string without updating all three. |
| 69 | + - name: 🌐 Inject GEO root files into gh-pages |
| 70 | + if: > |
| 71 | + (github.event_name == 'push' && github.ref == 'refs/heads/develop') || |
| 72 | + github.event_name == 'workflow_dispatch' || |
| 73 | + (github.event_name == 'release' && github.event.action == 'published') |
| 74 | + run: | |
| 75 | + cp docs/robots.txt /tmp/robots.txt |
| 76 | + cp docs/llms.txt /tmp/llms.txt |
| 77 | + cp docs/0d5d9799b1cc4a39825146388c6781eb.txt /tmp/indexnow.txt |
| 78 | + git fetch origin gh-pages |
| 79 | + git checkout gh-pages |
| 80 | + cp /tmp/robots.txt robots.txt |
| 81 | + cp /tmp/llms.txt llms.txt |
| 82 | + cp /tmp/indexnow.txt 0d5d9799b1cc4a39825146388c6781eb.txt |
| 83 | + git add robots.txt llms.txt 0d5d9799b1cc4a39825146388c6781eb.txt |
| 84 | + git diff --cached --quiet || git commit -m "chore: update GEO root files (robots.txt, llms.txt, indexnow)" |
| 85 | + git push origin gh-pages |
| 86 | +
|
| 87 | + - name: 📡 Notify IndexNow |
| 88 | + if: > |
| 89 | + (github.event_name == 'push' && github.ref == 'refs/heads/develop') || |
| 90 | + github.event_name == 'workflow_dispatch' || |
| 91 | + (github.event_name == 'release' && github.event.action == 'published') |
| 92 | + run: | |
| 93 | + curl -s -o /dev/null -w "%{http_code}" -X POST "https://api.indexnow.org/IndexNow" \ |
| 94 | + -H "Content-Type: application/json; charset=utf-8" \ |
| 95 | + -d '{ |
| 96 | + "host": "supervision.roboflow.com", |
| 97 | + "key": "0d5d9799b1cc4a39825146388c6781eb", |
| 98 | + "keyLocation": "https://supervision.roboflow.com/0d5d9799b1cc4a39825146388c6781eb.txt", |
| 99 | + "urlList": [ |
| 100 | + "https://supervision.roboflow.com/", |
| 101 | + "https://supervision.roboflow.com/latest/", |
| 102 | + "https://supervision.roboflow.com/latest/how_to/detect_and_annotate/", |
| 103 | + "https://supervision.roboflow.com/latest/how_to/track_objects/", |
| 104 | + "https://supervision.roboflow.com/latest/how_to/detect_small_objects/", |
| 105 | + "https://supervision.roboflow.com/latest/how_to/filter_detections/", |
| 106 | + "https://supervision.roboflow.com/latest/how_to/save_detections/", |
| 107 | + "https://supervision.roboflow.com/latest/how_to/count_in_zone/", |
| 108 | + "https://supervision.roboflow.com/latest/how_to/benchmark_a_model/", |
| 109 | + "https://supervision.roboflow.com/latest/how_to/process_datasets/" |
| 110 | + ] |
| 111 | + }' || true |
0 commit comments