Scrape White House Briefing Room #11763
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: Scrape White House Briefing Room | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: '28 */2 * * *' | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
with: | |
pandoc-version: '2.17.1.1' | |
- name: Install pipenv | |
run: | | |
pipx install pipenv | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: 'pipenv' | |
- name: Install dependencies | |
run: | | |
cd _scraper | |
pipenv install | |
- name: Scrape | |
run: | | |
cd _scraper | |
pipenv run python __main__.py .. | |
- name: Commit and push | |
run: |- | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
git add -A | |
timestamp=$(date -u) | |
git commit -m "Update at ${timestamp}" || exit 0 | |
git pull --rebase | |
git push |