name: Update bot data

# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
  push:
    branches: ['main']

jobs:
  validate-questions:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Validate questions
        run: python scripts/validate_questions.py
        shell: sh

  update-data:
    runs-on: ubuntu-latest
    steps:

      - name: Configure custom DNS resolver
        run: echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf
    
      - name: Call webhook
        run: curl -X POST ${{secrets.DEPLOY_WEBHOOK}}
