Skip to content

Commit

Permalink
Update render_site.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
kzollove authored Feb 14, 2025
1 parent 930d561 commit d4d68d0
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/render_site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,16 @@ jobs:
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::rmarkdown
any::knitr
- uses: r-lib/actions/setup-renv@v2

- name: Render RMarkdown site
run: Rscript -e 'rmarkdown::render_site("rmd")'

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
- name: Render Rmarkdown files and Commit Results
run: |
RMD_PATH=($(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '[.]Rmd$'))
Rscript -e 'for (f in commandArgs(TRUE)) if (file.exists(f)) rmarkdown::render(f)' ${RMD_PATH[*]}
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit ${RMD_PATH[*]/.Rmd/.md} -m 'Re-build Rmarkdown files' || echo "No changes to commit"
git push origin || echo "No changes to commit"

0 comments on commit d4d68d0

Please sign in to comment.