collect_papers #376
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: 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 |