Skip to content

Remove ignored files #3

Remove ignored files

Remove ignored files #3

Workflow file for this run

name: Styler
permissions: read-all
on:
workflow_dispatch:
push:
paths: ["**.[rR]", "**.[qrR]md", "**.[rR]markdown", "**.[rR]nw", "**.[rR]profile"]
concurrency:
group: styler
cancel-in-progress: true
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
jobs:
styler:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup r2u
uses: eddelbuettel/github-actions/r2u-setup@master
- name: Install R packages
run: Rscript -e 'install.packages(c("styler", "roxygen2"))'
- name: Enable styler cache
run: styler::cache_activate()
shell: Rscript {0}
- name: Determine cache location
id: styler-location
run: |
cat(
"location=",
styler::cache_info(format = "tabular")$location,
"\n",
file = Sys.getenv("GITHUB_OUTPUT"),
append = TRUE,
sep = ""
)
shell: Rscript {0}
- name: Cache styler
uses: actions/cache@v4
with:
path: ${{ steps.styler-location.outputs.location }}
key: ${{ runner.os }}-styler-${{ github.sha }}
restore-keys: |
${{ runner.os }}-styler-
${{ runner.os }}-
- name: Style
run: styler::style_dir()
shell: Rscript {0}
- name: Commit and push
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: '${{ github.workflow }}'