name: IndexNow

on:
  page_build

jobs:
  indexnow:
    runs-on: ubuntu-latest
    steps:
      - name: create IndexNow key
        run: echo "${{ secrets.INDEXNOW_KEY }}" > "${{ secrets.INDEXNOW_KEY }}.txt"
        
      - name: IndexNow
        uses: bojieyang/indexnow-action@v2
        with:
          sitemap-location: 'https://smithsonian.github.io/SuperNOVAS/sitemap.xml'
          key: ${{ secrets.INDEXNOW_KEY }}
          key-location: 'https://smithsonian.github.io/SuperNOVAS/${{ secrets.INDEXNOW_KEY }}.txt'
          limit: 200

