Skip to content

more rerendering

more rerendering #21

Workflow file for this run

on:
push:
branches:
- master
# paths: ['**.Rmd']
name: render-rmarkdown
jobs:
render-rmarkdown:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
fetch-depth: 0
env:
GITHUB_PAT: ${{ secrets.GH_ACTION }}
- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
with:
image: meenaljhajharia/bda-docker:latest
options: -v ${{ github.workspace }}:/work
shell: bash
run: |
cd /work
git config --global --add safe.directory /work
git config --global user.name "avehtari"
git config --global user.email "[email protected]"
git checkout master
rmdfiles=$(git diff --name-only HEAD^ | grep '[.]*Rmd$')
# qmdfiles=$(git diff --name-only HEAD^ | grep '[.]*qmd$')
if [ -n "${rmdfiles}" ]; then while read -r filename; do echo "$filename"; Rscript -e "rmarkdown::render('$filename')"; done <<< "$rmdfiles"; fi
# while read -r filename; do echo "$filename"; quarto render $filename; done <<< "$qmdfiles"
- name: GitHub Pages action
uses: peaceiris/[email protected]
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GH_ACTION}}
publish_branch: gh-pages
keep_files: true
publish_dir: .