Merge pull request #18 from openwashdata/dev #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Render README | |
on: | |
push: | |
branches: [main] | |
paths: | |
- 'README.qmd' | |
- 'DESCRIPTION' | |
pull_request: | |
branches: [main] | |
paths: | |
- 'README.qmd' | |
- 'DESCRIPTION' | |
jobs: | |
render: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: '4.3.0' | |
- name: Install R dependencies | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
packages: | | |
any::knitr | |
any::rmarkdown | |
any::desc | |
any::dplyr | |
- name: Render Quarto document | |
uses: quarto-dev/quarto-actions/render@v2 | |
with: | |
path: README.qmd | |
- name: Commit rendered files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add README.md | |
git diff --staged --quiet || git commit -m "Auto-render README from Quarto" | |
git push |