Update ky by Youtube #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update ky by Youtube | |
| # 실행 일시 중지 | |
| on: | |
| schedule: | |
| - cron: "0 14 * * *" # 한국 시간 23:00 실행 (UTC+9 → UTC 14:00) | |
| workflow_dispatch: | |
| permissions: | |
| contents: write # push 권한을 위해 필요 | |
| jobs: | |
| run-npm-task: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| run_install: false | |
| - name: Install dependencies | |
| working-directory: packages/crawling | |
| run: pnpm install | |
| - name: Create .env file | |
| working-directory: packages/crawling | |
| run: | | |
| echo "SUPABASE_URL=${{ secrets.SUPABASE_URL }}" >> .env | |
| echo "SUPABASE_KEY=${{ secrets.SUPABASE_KEY }}" >> .env | |
| - name: run update script - packages/crawling/crawlYoutube.ts | |
| working-directory: packages/crawling | |
| run: pnpm run ky-youtube |