Scheduled ETL: Analyze Drudge #778
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: "Scheduled ETL: Analyze Drudge" | |
on: | |
schedule: | |
- cron: '0 10 * * *' | |
workflow_dispatch: | |
concurrency: | |
group: analyze-drudge | |
cancel-in-progress: true | |
jobs: | |
hyperlinks: | |
name: Process hyperlinks | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
steps: | |
- id: checkout | |
name: Checkout | |
uses: actions/checkout@v4 | |
- id: install | |
name: Install | |
uses: ./.github/actions/install | |
- id: analyze | |
name: Analyze Drudge hyperlinks | |
run: pipenv run newshomepages-analyze drudge-hyperlinks -o ./ | |
shell: bash | |
- id: upload-to-internet-archive | |
name: Upload files to archive.org | |
uses: palewire/internet-archive-upload@v1 | |
with: | |
access-key: ${{ secrets.IA_ACCESS_KEY }} | |
secret-key: ${{ secrets.IA_SECRET_KEY }} | |
identifier: news-homepages-extracts | |
files: drudge-hyperlinks-analysis.csv | |
entities: | |
name: Extract entities | |
runs-on: ubuntu-latest | |
needs: hyperlinks | |
timeout-minutes: 120 | |
steps: | |
- id: checkout | |
name: Checkout | |
uses: actions/checkout@v4 | |
- id: install | |
name: Install | |
uses: ./.github/actions/install | |
- id: install-spacy | |
name: Install Spacy language dictionary | |
run: pipenv run python -m spacy download en_core_web_lg | |
shell: bash | |
- id: analyze | |
name: Analyze Drudge entities | |
run: pipenv run newshomepages-analyze drudge-entities -o ./ | |
shell: bash | |
- id: upload-to-internet-archive | |
name: Upload files to archive.org | |
uses: palewire/internet-archive-upload@v1 | |
with: | |
access-key: ${{ secrets.IA_ACCESS_KEY }} | |
secret-key: ${{ secrets.IA_SECRET_KEY }} | |
identifier: news-homepages-extracts | |
files: drudge-entities-analysis.csv |