-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.17 KB
/
refresh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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@v3
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- name: Set up Playwright
run: pnpm exec playwright install
- name: Refresh list
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
command: pnpm 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