Skip to content

Scrape and commit #1647

Scrape and commit

Scrape and commit #1647

Workflow file for this run

# This workflow scrapes the latest show episodes and commits the new episode and data
# files to the repo.
name: Scrape and commit
on:
schedule:
- cron: '0 8,13 * * *' # Midnight and 5 AM Pacific Time
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
permissions:
contents: write
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: 'Checkout jupiterbroadcasting.com'
uses: actions/checkout@v4
with:
repository: JupiterBroadcasting/jupiterbroadcasting.com
ref: main
path: ./jbsite
- name: 'Checkout show-scraper'
uses: actions/checkout@v4
with:
repository: ChanceM/show-scraper-2
ref: main
path: ./show-scraper
- name: 'Setup Python'
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
cache: "pipenv"
- name: 'Install Python deps'
run: pip install pipenv && cd ./show-scraper && pipenv sync --bare
- name: 'Scrape'
run: |
cd ./show-scraper
DATA_DIR=../jbsite LATEST_ONLY=true pipenv run python ./scraper.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.SS2_PAT }}
commit-message: Automatically scraped and committed via a GitHub Action.
title: Add scraped episode(s)
body: Automatically scraped by show-scraper-2.
base: main
path: ./jbsite
push-to-fork: ChanceM/jupiterbroadcasting.com
branch: release/automatic-episode-scrape
delete-branch: true