Cron Crawling #97
This file contains 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: Cron Crawling | |
on: | |
schedule: | |
# At 12:30 on Tuesday | |
- cron: '30 12 * * 2' | |
jobs: | |
cron: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest] | |
node: ["16"] | |
name: Node ${{ matrix.node }} (${{ matrix.platform }}) | |
runs-on: ${{ matrix.platform }} | |
env: | |
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} | |
defaults: | |
run: | |
working-directory: crawler | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install modules | |
run: yarn | |
- name: Run crawling | |
run: yarn crawling | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Add & Commit | |
uses: EndBug/add-and-commit@v9.0.0 | |
with: | |
add: 'data' | |
author_name: Billboard Crawler | |
author_email: coderhyun476@gmail.com | |
message: 'Billboard Hot 100 crawling at ${{ steps.date.outputs.date }}' | |