name: Generate Sponsors README
on:
  push:
    branches:
      - main
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Generate Sponsors (bronze) 💖
        uses: slimsag/github-sponsors-readme-action@dev
        with:
          token: ${{ secrets.SLIMSAG_SPONSORS_PAT }}
          file: 'README.md'
          maximum: 600 # cents
          marker: 'bronze'

      - name: Generate Sponsors (silver) 💖
        uses: slimsag/github-sponsors-readme-action@dev
        with:
          token: ${{ secrets.SLIMSAG_SPONSORS_PAT }}
          file: 'README.md'
          minimum: 2500 # cents
          maximum: 2600 # cents
          marker: 'silver'

      - name: Push changes to GitHub
        uses: JamesIves/github-pages-deploy-action@4.1.1
        with:
          branch: main
          folder: '.'
          commit-message: 'README: regenerate sponsors section'
