Skip to content

Adding external facing workshop documentation #1157

Adding external facing workshop documentation

Adding external facing workshop documentation #1157

Workflow file for this run

name: Spell check R Markdown and Markdown files
# Controls when the action will run.
# Pull requests to master only.
on:
pull_request:
branches:
- master
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "spell check"
spell-check:
runs-on: ubuntu-latest
container:
image: rocker/tidyverse:4.2.3
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- name: Install packages
run: Rscript --vanilla -e "install.packages(c('spelling'), repos = c(CRAN = '$CRAN'))"
- name: Run spell check
id: spell_check_run
run: |
results=$(Rscript --vanilla "scripts/spell-check.R")
echo "sp_chk_results=$results" >> $GITHUB_OUTPUT
cat spell_check_errors.tsv
- name: Archive spelling errors
uses: actions/upload-artifact@v3
with:
name: spell-check-results
path: spell_check_errors.tsv
# If there are too many spelling errors, this will stop the workflow
- name: Check spell check results - fail if too many errors
if: ${{ steps.spell_check_run.outputs.sp_chk_results > 0 }}
run: exit 1