Skip to content

Rearrange

Rearrange #185

Workflow file for this run

on:
push:
branches: [main, master]
workflow_dispatch:
name: update-docs
permissions: write-all
# This will cancel running jobs once a new run is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
update-docs:
runs-on: windows-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
install-quarto: true
extra-packages: |
local::.
any::rcmdcheck
any::reactable
ropengov/rogtemplate
dieghernan/pkgdev
- name: Install optipng
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update
sudo apt-get install optipng
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install optipng
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install optipng
else
echo "$RUNNER_OS not supported"
exit 1
fi
shell: bash
- name: Run jarl
uses: etiennebacher/setup-jarl@v0.1.0
continue-on-error: true
with:
args: check . --fix --min-r-version 4.1.0
- name: Install Air
uses: posit-dev/setup-air@v1
- name: Format package
run: air format .
- name: Update docs
run: |
source("data-raw/compress_css.R")
pkgdev::update_docs()
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 -A
git commit -m 'Update docs with pkgdev' || echo "No changes to commit"
git push origin || echo "No changes to commit"
- uses: r-lib/actions/check-r-package@v2