Skip to content

feat: additional CI workflows #5

feat: additional CI workflows

feat: additional CI workflows #5

Workflow file for this run

name: check-link-rot
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
check-link-rot:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "latest"
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Run URL checker
run: |
install.packages(c("urlchecker", "cli"))
options(crayon.enabled = TRUE)
rotten_links <- urlchecker::url_check(progress = FALSE)
print(rotten_links)
if (length(rotten_links$URL) > 0L) {
cli::cli_abort("Some URLs are outdated and need to be updated.")
}
shell: Rscript {0}