Skip to content

Update

Update #203

Workflow file for this run

name: Update
on:
schedule:
- cron: '0 23 * * *'
workflow_dispatch:
jobs:
update-data:
runs-on: ubuntu-latest
permissions:
contents: write
env:
TURSO_TOKEN: ${{ secrets.TURSO_TOKEN }}
TURSO_URL: ${{ secrets.TURSO_URL }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-node@v3
- name: Install dependencies
run: yarn
- name: Get Top GPTs
run: node scripts/fetch.cjs
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "airyland"
git add -A
DATE=$(date -u +"%Y-%m-%d")
git diff --quiet --staged || (git add . && git commit -m "Update GPTs data for $DATE")
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main