-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (44 loc) · 1.4 KB
/
render_and_update_readme.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
43
44
45
46
47
48
49
50
51
52
name: Render Notebooks and Update README
on:
push:
paths:
- 'notebooks/R/**'
- 'notebooks/Python/**'
pull_request:
paths:
- 'notebooks/R/**'
- 'notebooks/Python/**'
jobs:
render_and_update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Set up R environment
- name: Set up R
uses: r-lib/actions/setup-r@v2
# Install required R packages (knitr and rmarkdown)
- name: Install R dependencies
run: |
R -e "install.packages('knitr')"
R -e "install.packages('rmarkdown')"
# Install necessary dependencies
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install nbconvert selenium webdriver-manager quarto-cli
# Render the added/changed files
- name: Render and take screenshots
run: |
python .github/scripts/render_and_screenshot.py
# Commit changes (screenshots and updated README)
- name: Commit and push changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add notebooks/screenshots README.md
git commit -m "Auto update README with new files and screenshots"
git push