Crawl news data #1328
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: Crawl news data | |
on: | |
schedule: | |
- cron: 0 10 * * * | |
workflow_dispatch: | |
jobs: | |
crawl-and-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
architecture: x64 | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f crawler/requirements.txt ]; then pip install -r crawler/requirements.txt; fi | |
- name: Crawl news data | |
run: | | |
node crawler/crawl.js | |
- name: Add and commit | |
uses: EndBug/add-and-commit@v4.2.1 | |
with: | |
add: ./data | |
default_author: github_actor |