Add cached-version disclosure include to all SW-enabled pages #70
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ping IndexNow | |
| # Fires on every push to main — after the site is live, tell Bing / | |
| # Naver / Yandex / Seznam / Yep "hey, we changed" via IndexNow so they | |
| # re-crawl immediately instead of waiting for their normal schedule. | |
| # One submission fans out to every IndexNow partner engine. | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| submit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| # IndexNow validates the key by fetching it from the live site, so we | |
| # must wait for the Pages deploy (not just the push) before submitting. | |
| - name: Wait for site to go live | |
| shell: bash | |
| run: | | |
| KEY="2e369f12018dcc78a68d9ed417f3a8b4" | |
| for i in $(seq 1 30); do | |
| body=$(curl -s --max-time 10 "https://acreetionos.org/${KEY}.txt" || true) | |
| if [ "$body" = "$KEY" ]; then | |
| echo "Site is live (key file verified) after ${i} tries" | |
| exit 0 | |
| fi | |
| echo "waiting for deploy... (${i}/30)" | |
| sleep 15 | |
| done | |
| echo "Timed out waiting for site deploy" >&2 | |
| exit 1 | |
| - name: Submit URLs to IndexNow | |
| run: python3 scripts/submit-indexnow.py |