name: Meetupr JWT Token Job
on:
  workflow_dispatch:
jobs:
  jwt-job:
    runs-on: ubuntu-latest
    env:
      <<client_name>>_jwt_token: ${{ secrets.JWT_TOKEN }}
      <<client_name>>_jwt_issuer: ${{ secrets.JWT_ISSUER }}
      <<client_name>>_client_key: ${{ secrets.CLIENT_KEY }}
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    steps:
      - uses: actions/checkout@v4

      - name: Set up R
        uses: r-lib/actions/setup-r@v2

      - name: Install dependencies
        run: |
          install.packages('pak')
          pak::pak('rladies/meetupr')
        shell: Rscript {0}

      - name: Check Meetupr Situation Report
        run: meetupr::meetupr_sitrep()
        shell: Rscript {0}

      - name: Run custom R script
        run: |
          Rscript  path/to/your/script.R
