-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.04 KB
/
schedule.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
name: Run schduling jobs for crawling.
on:
schedule:
- cron: "0 11 * * 1-6" # UTC 기준 월~금 11:00(한국 기준 20:00)
push:
branches:
- main
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
# Github Reposiroty의 Secret 가져와서 .env 생성하기
- name: Create .env file
run: jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' <<< "$SECRETS_CONTEXT" > .env
env:
SECRETS_CONTEXT: ${{ toJson(secrets) }}
- name: Install dependencies
run: bun install
- name: Run app.ts
run: bun run scheduling
- name: Commit and push if changed
run: |
git config --local user.email "[email protected]"
git config --local user.name "KimCookieYa"
git add data/homepage.json
git commit -m "Update homepage.json" || exit 0 # 변경사항이 없으면 커밋하지 않음
git push