-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (33 loc) · 1.01 KB
/
updatenotebook.yaml
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
name: Update notebook
on:
workflow_dispatch:
schedule:
- cron: "5 10 * * 0" # once per week
jobs:
run:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.8.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install papermill ipykernel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Execute notebook
env:
OPS_API_TOKEN: ${{ secrets.OPS_API_TOKEN }}
API_BASE_URL: https://engrxiv.org/index.php/engrxiv/api/v1
run: |
papermill engrXiv_prints.ipynb engrXiv_prints.ipynb
- name: Commit and push files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add engrXiv_prints.ipynb
git commit -m "Update stats notebook" -a
git push origin master -f