Skip to content

Basic infrastructure: Add Dockerfile and basic testing for this repository #2

Basic infrastructure: Add Dockerfile and basic testing for this repository

Basic infrastructure: Add Dockerfile and basic testing for this repository #2

Workflow file for this run

# Candace Savonen 2021
# Updated Jan 2023
name: Pull Request
on:
pull_request:
branches: [ main, staging ]
jobs:
style-code:
name: Style code
runs-on: ubuntu-latest
container:
image: cansav09/gimap
steps:
- name: Checkout files
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run styler
run: Rscript -e "styler::style_file(list.files(pattern = 'Rmd$', recursive = TRUE, full.names = TRUE));warnings()"
- name: Commit styled files
run: |
git config --system --add safe.directory "$GITHUB_WORKSPACE"
git add \*.Rmd
git commit -m 'Style Rmds' || echo "No changes to commit"
git push origin || echo "No changes to commit"
############################# Render Preview ###################################
render-preview:
name: Render preview
runs-on: ubuntu-latest
container:
image: cansav09/gimap
steps:
- name: Checkout files
uses: actions/checkout@v3
with:
fetch-depth: 0
# Run bookdown rendering
- name: Run vignette
run: Rscript -e "rmarkdown::render('vignettes/getting-started.Rmd')"