Fixes: language and status #397
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: Run CREA website scraper | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: "5 15 * * 6" | |
jobs: | |
scrape: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9.10 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Install package | |
run: | | |
poetry install --no-interaction | |
- name: Run scraper | |
run: | | |
poetry run python src/crea_scraper/scraper.py | |
- uses: mikeal/publish-to-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH_NAME: "" #optional defaults to master |