-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (39 loc) · 1.14 KB
/
run-notebook.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
name: generate README
on:
schedule:
- cron: '0 12 * * *' # Every day at 12:00
push:
branches:
- main
jobs:
example-1:
if: "!contains(github.event.commits[0].message, '[skip ci]')"
name: Run notebook
runs-on: ubuntu-latest
env:
TOKEN: ${{ secrets.TOKEN }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
- name: Run notebook
run: |
python ipynb_filter.py
jupyter-nbconvert --execute --inplace --ExecutePreprocessor.timeout=3200 update-readme.ipynb
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Add changes [skip ci]" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.TOKEN }}