Skip to content

Update patrons

Update patrons #166

name: Update patrons
on:
# run few times a month
schedule:
- cron: "0 0 1,18,15,22 * *"
jobs:
update-patrons:
runs-on: ubuntu-latest
environment: website
env:
# secrets to environment variables
PATREON_ACCESS_TOKEN: ${{ secrets.PATREON_ACCESS_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: "14.x"
- name: Install packages
run: yarn install
working-directory: ./scripts/get-patrons
- name: Run script
run: yarn start
working-directory: ./scripts/get-patrons
- name: Commit updated list of patrons
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: "./data/patrons.yaml"
commit_message: "Update patron list"
push_options: --force
branch: main