Skip to content

Update collect_papers.yml #32

Update collect_papers.yml

Update collect_papers.yml #32

name: collect_papers

Check failure on line 1 in .github/workflows/collect_papers.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/collect_papers.yml

Invalid workflow file

`schedule` accepts a list of one or more maps with the `cron` key set
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