-
Notifications
You must be signed in to change notification settings - Fork 8
30 lines (28 loc) · 799 Bytes
/
Copy pathscrape.yml
File metadata and controls
30 lines (28 loc) · 799 Bytes
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
name: Scrape latest data
on:
push:
workflow_dispatch:
schedule:
- cron: "0 6-18 * * *" # “At minute 0 past every hour from 6 through 18.”
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Fetch latest data
run: bun run fetch
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push