generated from codingpot/newsletter_awesome_articles
-
Notifications
You must be signed in to change notification settings - Fork 14
42 lines (34 loc) · 1.1 KB
/
collect_papers.yml
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
name: collect_papers
on:
schedule:
- cron: "0 20 * * *"
# workflow_dispatch:
# inputs:
# date:
# required: true
# type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.5
- name: Download daily papers
run: |
cur_date=$(date '+%Y-%m-%d')
# curl "https://huggingface.co/api/daily_papers?date=${{ github.event.inputs.date }}" -o daily_papers.json
curl "https://huggingface.co/api/daily_papers?date=$cur_date" -o daily_papers.json
- name: Write daily papers post
run: |
cd ./src && go run main.go parse -g ${{ secrets.GEMINI_API_KEY }} -s ${{ secrets.SOLAR_API_KEY }} -f ../daily_papers.json -o ../current
- name: Commit Changes
run: |
git config --global user.name 'Chansung'
git config --global user.email '[email protected]'
git pull
git add .
git commit -m "Automated report"
git push