Skip to content

collect_papers

collect_papers #150

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 'deep.diver.csp@gmail.com'
git pull
git add .
git commit -m "Automated report"
git push