Add more setup instructions to README #54
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Spell check Markdown files | |
# Controls when the action will run. | |
# Pull requests to main only. | |
on: | |
pull_request: | |
branches: | |
- main | |
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 | |
if: ${{ steps.spell_check_run.outputs.sp_chk_results > 0 }} | |
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 |