-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.1 KB
/
fetch_generate_publish.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: 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 }}