name: Submit New URLs to Bing

on:
  push:
    branches:
      - main
  workflow_dispatch:

jobs:
  submit-urls:
    runs-on: ubuntu-latest
    
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          
      - name: Setup pnpm
        uses: pnpm/action-setup@v2
        with:
          version: 8
          
      - name: Install dependencies
        run: pnpm install
        
      - name: Submit new URLs to Bing
        run: node scripts/submit-to-bing.mjs
