Skip to content

Workflow file for this run

name: Basketball Reference Web Scraper
on:
release:
types: [published]
push:
branches:
- v4
pull_request:
schedule:
- cron: '0 22 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8']
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
uses: abatilo/actions-poetry@v1.5.0
with:
python_version: ${{ matrix.python-version }}
poetry_version: 1.0.9
args: install
- name: Test
uses: abatilo/actions-poetry@v1.5.0
with:
python_version: ${{ matrix.python-version }}
poetry_version: 1.0.9
args: run python -m coverage run -m unittest discover
- name: Upload Coverage To Codecov
uses: codecov/codecov-action@v1
docs:
name: Publish Documentation
runs-on: ubuntu-latest
needs: build
if: ${{ github.ref == 'refs/heads/v4' }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install Dependencies
uses: abatilo/actions-poetry@v1.5.0
with:
python_version: '3.8'
poetry_version: 1.0.9
args: install
- name: Set Git Configuration
run: |
REMOTE="https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}"
git config --global user.name "${GH_NAME}"
git config --global user.email "${GH_EMAIL}"
git remote set-url origin ${REMOTE}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_NAME: ${{ secrets.GH_NAME }}
GH_EMAIL: ${{ secrets.GH_EMAIL }}
- name: Deploy To GitHub Pages
uses: abatilo/actions-poetry@v1.5.0
with:
python_version: '3.8'
poetry_version: 1.0.9
args: run python -m mkdocs gh-deploy --clean --force