Skip to content

Commit

Permalink
Merge branch 'main' into check-antigen-isos
Browse files Browse the repository at this point in the history
  • Loading branch information
d-morrison authored Jul 16, 2024
2 parents 88758b1 + ca99c04 commit 14d0a3e
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/R-check-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
push:
branches: [main, master]
pull_request:

name: "Documentation check"

jobs:
docs-check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ github.token }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::roxygen2
needs: roxygen2

- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}

- name: Check for changed files
run: |
git add --all
changes=$(git diff-index HEAD --name-only -- man/ NAMESPACE DESCRIPTION)
if [ -n "$changes" ]; then
echo "Changes found after documenting."
git --no-pager diff
echo "$changes"
echo "Please update documentation."
exit 1
else
echo "No changes found after documenting."
exit 0
fi

0 comments on commit 14d0a3e

Please sign in to comment.