name: Check deploy configuration

on:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  check:
    runs-on: ubuntu-24.04
    steps:
      - name: Check required configuration
        shell: bash
        env:
          SITE_URL: ${{ vars.SITE_URL }}
          DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
        run: |
          set -euo pipefail
          test -n "$SITE_URL" || {
            echo 'SITE_URL is not configured'
            exit 1
          }
          test -n "$DEPLOY_SSH_KEY" || {
            echo 'DEPLOY_SSH_KEY is not configured'
            exit 1
          }
          echo 'Required configuration is present'
