Skip to content

Run schduling jobs for crawling. #3406

Run schduling jobs for crawling.

Run schduling jobs for crawling. #3406

Workflow file for this run

name: Run schduling jobs for crawling.
on:
schedule:
- cron: "0 0-11 * * 1-6" # UTC 기준 월~금 00:00~11:00(한국 기준 09:00~20:00)
push:
branches:
- main
permissions: write-all
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
# 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 scheduling
- name: Commit and push if changed
run: |
git config --local user.email "[email protected]"
git config --local user.name "KimCookieYa"
git add data/index.json
git commit -m "Update index.json" || exit 0 # 변경사항이 없으면 커밋하지 않음
git push