generated from pharmaverse/admiraltemplate
/
spellchecks.Rmd
52 lines (34 loc) · 1.73 KB
/
spellchecks.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
title: "Spellchecks"
output:
rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Spellchecks}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
# Spelling Workflow
This GitHub Actions workflow performs spellchecking on the specified R files. The workflow is triggered manually (`workflow_dispatch`) and can also be invoked as a workflow call (`workflow_call`).
## Workflow Structure
The workflow consists of a single job: `spellcheck`.
### `spellcheck` Job
This job runs spellcheck on R files.
#### Inputs
- `r-version`: The version of R to use. Default is 'release'.
- `exclude`: List of paths to exclude (comma-separated list). Default is an empty string.
#### Conditions
The spellcheck job is skipped if the commit message contains `[skip spellcheck]`.
#### Steps
1. **Get branch names:** Extracts branch names.
2. **Checkout repo (PR):** Checks out the repository based on the event type (pull request).
3. **Checkout repository:** Checks out the repository for events other than pull requests.
4. **Restore cache:** Restores cached dependencies.
5. **Run Staged dependencies:** Runs staged dependencies action.
6. **Install dependencies from DESCRIPTION:** install dependencies from DESCRIPTION (in case of missing dependencies in parent admiralci docker image)
7. **Run Spellcheck:** Executes the spellcheck action on specified R files.
### Triggers
- `workflow_dispatch`: Manually triggered workflow with optional inputs.
- `workflow_call`: Invoked as a workflow call.
### Permissions
- `contents: write`: Write permissions for repository contents.
Note : It's possible to ignore some spell checks using `inst/WORDLIST` file. It's possible to update it automatically using directly `spelling::update_wordlist()`