Refresh all sources #837
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Refresh all sources | |
on: | |
schedule: | |
- cron: '0 4 * * *' # every day at 4 in the morning | |
workflow_dispatch: | |
jobs: | |
refresh: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v2 | |
- run: bun install --frozen-lockfile | |
- name: Set up Playwright | |
run: bunx playwright install chromium | |
- name: Refresh list | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: bun run crawl | |
- name: Raise a PR if files have changed | |
id: cpr | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
add-paths: | | |
data/* | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
token: ${{ secrets.PAT }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: squash |