This repository was archived by the owner on Oct 24, 2026. It is now read-only.
Repository navigation
65 lines (62 loc) · 2.04 KB
/
Copy pathsummarize.yml
File metadata and controls
65 lines (62 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Summarize Articles
env:
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }}
on:
workflow_dispatch:
inputs:
force_generate_all:
description: 'Force generate summaries for all posts'
required: false
type: boolean
default: false
schedule:
- cron: '0 10 * * 2'
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: |
sudo apt-get update
sudo apt-get install -y jq
- 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
python -m pip install -r requirements-langchain.txt
- name: Fetch File from Repo #2
run: |
curl -f -O "https://raw.githubusercontent.com/wesslen/arxiv-frontpage/main/data/input.jsonl"
mv input.jsonl data/input.jsonl
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add data/input.jsonl
timestamp=$(date -u)
git commit -m "Update input.jsonl from Frontpage: ${timestamp}" || exit 0
git push
- name: Run summarization
run: |
FORCE_FLAG=""
if [ ${{ github.event.inputs.force_generate_all }} = true ]; then
FORCE_FLAG="--force-generate-all"
fi
python scripts/summarizer.py data/input.jsonl $FORCE_FLAG
- 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