Skip to content

Run schduling jobs for crawling. #293

Run schduling jobs for crawling.

Run schduling jobs for crawling. #293

Workflow file for this run

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