Skip to content

Fail fast on CI grid #6

Fail fast on CI grid

Fail fast on CI grid #6

# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# The action runs when:
# - A new release is published
# - Changes to the main branch
on:
release:
types: [published]
push:
branches: [master, main]
workflow_dispatch:
name: Update Docs and Metadata
jobs:
update-docs-and-meta:
runs-on: macos-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::cffr
any::codemeta
any::rmarkdown
any::devtools
- name: Update package metadata and docs
run: |
devtools::document()
cffr::cff_write(keys = list())
codemeta::write_codemeta()
rmarkdown::render('README.Rmd', output_options = list(html_preview = FALSE))
shell: Rscript {0}
- name: Commit results
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add CITATION.cff codemeta.json README.md NAMESPACE man/**
git commit -m 'Update package metadata and documentation' || echo "No changes to commit"
git push origin || echo "No changes to commit"