Skip to content

Merge pull request #44 from FredHutch/annotReview_ki #163

Merge pull request #44 from FredHutch/annotReview_ki

Merge pull request #44 from FredHutch/annotReview_ki #163

# Candace Savonen Jan 2024
name: Render vignette with Docker image
on:
workflow_dispatch:
pull_request:
branches: [ main, staging ]
push:
branches: [ main, staging ]
paths:
- R/*
- inst/extdata/*
jobs:
render-vignette:
name: Render test
runs-on: ubuntu-latest
container:
image: cansav09/gimap
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login as jhudsl-robot
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global user.email "itcrtrainingnetwork@gmail.com"
git config --global user.name "jhudsl-robot"
- name: Run vignette
run: Rscript -e "rmarkdown::render('vignettes/getting-started.Rmd')"
# Commit the rendered bookdown files
- name: Commit rendered files
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
git remote set-url origin https://${GH_PAT}@github.com/${GITHUB_REPOSITORY}
git fetch origin
git add --force docs/*
git commit -m 'Render vignette' || echo "No changes to commit"
git pull --allow-unrelated-histories --strategy-option=ours
git push -u origin main || echo "No changes to push"