Skip to content

Commit

Permalink
Docs website with pkgdown (#28)
Browse files Browse the repository at this point in the history
* Setup pkgdown

* pre-commit autofixes

* Split function reference

* pre-commit autofixes

* trigger-ci

* Update pkgdown.yaml
  • Loading branch information
grst authored Jan 20, 2025
1 parent 15dd6a4 commit 7c542e4
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
^\.github$
^CHANGELOG\.md$
^LICENSE\.md$
^_pkgdown\.yml$
^docs$
^pkgdown$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
52 changes: 52 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Build docs using pkgdown"
on:
push:
branches:
- main
pull_request:
# also run on 'closed' to clean up the github pages dir
types:
- opened
- reopened
- synchronize
- closed

concurrency: preview-${{ github.ref }}

jobs:
docs:
name: "Build Docs"
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- 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:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy preview
if: github.event_name == 'pull_request'
uses: rossjrw/pr-preview-action@v1
with:
source-dir: docs

- name: Deploy docs
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
branch: gh-pages
clean-exclude: pr-preview/
force: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
args: [--allow_private_imports]
- id: roxygenize
# workaround https://github.com/lorenzwalthert/precommit/issues/609
additional_dependencies: ["rstudioapi"]
additional_dependencies: ["rstudioapi", "rlang", "methods", "stringr", "here", "glue", "yaml"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand Down
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Package: dso
Type: Package
Title: dso R companion package
Version: 0.7
Author: Daniel Schreyer<[email protected]>,
Gregor Sturm<gregor.sturm@boehringer-ingelheim.com>,
Thomas Schwarzl<thomas.schwarzl@boehringer-ingelheim.com>
Maintainer: Daniel Schreyer<daniel.schreyer.ext@boehringer-ingelheim.com>,
Gregor Sturm<gregor.sturm@boehringer-ingelheim.com>,
Thomas Schwarzl<[email protected]>
Authors@R: c(
person("Daniel", "Schreyer", email = "daniel.schreyer.ext@boehringer-ingelheim.com", role = c("aut", "cre")),
person("Gregor", "Sturm", email = "gregor.sturm@boehringer-ingelheim.com", role = "aut"),
person("Thomas", "Schwarzl", email = "thomas.schwarzl@boehringer-ingelheim.com", role = "aut"),
person("Alexander", "Peltzer", email = "alexander.peltzer@boehringer-ingelheim.com", role = "aut")
)
Description: Collection of functions used with the DevOps dso application.
License: LGPL (>= 3)
Encoding: UTF-8
Expand Down
36 changes: 36 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
url: ~
template:
bootstrap: 5
reference:
- title: Work with DSO stages
desc: Functions to load stage params and manipulate paths
contents:
- read_params
- set_stage
- stage_here
- reload

- title: dsoParams class reference
desc: Reference of the dsoParams class produced by read_params
contents:
- dsoParams
- as.list,dsoParams-method
- $.dsoParams
- dsoParams-class
- print.dsoParams
- show,dsoParams-method
- "[[.dsoParams"

- title: R interface to DSO CLI
desc: wrapper around the DSO command line interface
contents:
- create_stage
- compile_config
- init
- repro

- title: Rstudio addin
desc: functions related to the DSO rstudio addin
contents:
- dso_repro_stage_addin
- dso_repro_stage_w_dependencies_addin

0 comments on commit 7c542e4

Please sign in to comment.