Render README Workflow
This GitHub Actions workflow renders the README from R Markdown
(README.Rmd) to Markdown (README.md).
Additionally, it can format the generated Markdown using a formatter.
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: render.
render Job
This job renders the README from R Markdown to Markdown and optionally formats the generated Markdown.
Inputs
-
r-version: The version of R to use. Default is ‘release’. -
skip-md-formatting: Skip markdown auto-formatting. Default is ‘false’.
Steps
- Get branch names: Extracts branch names.
- Checkout repo (PR): Checks out the repository based on the event type (pull request).
- Checkout repository: Checks out the repository for events other than pull requests.
- Normalize inputs: Normalizes the R version input.
- Restore cache: Restores cached dependencies.
- Run Staged dependencies: Runs staged dependencies action.
- Install dependencies from DESCRIPTION: install dependencies from DESCRIPTION (in case of missing dependencies in parent admiralci docker image)
-
Render README to markdown: Renders
README.RmdtoREADME.md. - Install Markdown formatter: Installs the Markdown formatter if not skipping formatting.
- Commit and push formatted README.md: Commits and pushes changes to the formatted README.md file.