Skip to content

Update notebook

Update notebook #180

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/checkout@v3.3.0
- name: Set up Python
uses: actions/setup-python@v4.5.0
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 "action@github.com"
git config --local user.name "GitHub Action"
git add engrXiv_prints.ipynb
git commit -m "Update stats notebook" -a
git push origin master -f