Skip to content

Summarize Articles

Summarize Articles #10

Workflow file for this run

name: Summarize Articles
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
on:
workflow_dispatch:
jobs:
scheduled:
runs-on: ubuntu-latest
environment: summarize
steps:
- name: Check out this repo
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
cache-dependency-path: |
requirements-summarizer.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-build.txt
python -m pip install -r requirements-summarizer.txt
- name: Run summarization
run: |
python scripts/summarizer.py data/input.jsonl
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add data/output.jsonl
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push