-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (35 loc) · 1.09 KB
/
vig2ipynb.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
35
36
37
38
39
40
41
42
name: vig2ipynb
on:
push:
paths:
- 'vignettes/**.Rmd'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: actions/cache@v2
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/vig2ipynb_requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install -r vig2ipynb_requirements.txt
- name: Execute Bash code to generate notebooks
run: bash vig2ipynb.sh
- name: Commit and push new notebooks
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git status
git add vignettes/*.ipynb
timestamp=$(date -u)
git commit -m "Latest notebook update: ${timestamp}" || exit 0
git push