Skip to content

Fetch paper metadata, generate report, and update reports index #20

Fetch paper metadata, generate report, and update reports index

Fetch paper metadata, generate report, and update reports index #20

name: Fetch paper metadata, generate report, and update reports index
on:
schedule:
- cron: '0 0 * * 5' # This runs the workflow weekly on Friday at midnight
workflow_dispatch: # Allows manual trigger
jobs:
fetch-generate-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run the pipeline
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
run: |
bash src/fetch_generate_publish.sh
- name: Commit and push changes
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git add .
if [ -n "$(git status --porcelain)" ]; then
git commit -m 'Update paper metadata, reports, and index'
git push
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}