Skip to content

Commit

Permalink
Documentation & R-CMD Check workflows (#14)
Browse files Browse the repository at this point in the history
* add gh pages docs

* add inwtlab drat repo

* rm pandora drat repo

* fix typo

* move extra-repo.. entry

* fix extra-repo entry

* triger ci

* add INWTlab & Pandora Repo

* add R-CMD Check

* update r ver to 4.3.2

---------

Co-authored-by: Jan Abel <jan.abel@office-platform.net>
  • Loading branch information
jan-abel-inwt and Jan Abel authored Sep 30, 2024
1 parent ad39cee commit b811229
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
^deploy\.sh$
^\..*$
^\.Rproj\.user$
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
7 changes: 7 additions & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
# a sandbox.

.First <- function() {
options(
repos = c(
getOption("repos"),
INWTLab = "https://inwtlab.github.io/drat/",
PANDORA = "https://Pandora-IsoMemo.github.io/drat/"
)
)
# Check operating system
if (Sys.info()["sysname"] == "Windows") {
# Add libWin with the full path to libPaths
Expand Down
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/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
# We only test only a subset of os & r combination for non CRAN packages
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
extra-repositories: https://Pandora-IsoMemo.github.io/drat/

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
52 changes: 52 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
extra-repositories: |
https://inwtlab.github.io/drat/
- 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 to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
clean: false
branch: gh-pages
folder: docs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.Rproj.user
mpi-iso-data.Rproj
.Renviron
docs
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ Suggests:
lintr,
testthat
RoxygenNote: 7.2.3
URL: https://pandora-isomemo.github.io/iso-data/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM inwt/r-batch:4.1.2
FROM inwt/r-batch:4.3.2

ADD . .

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,4 @@ Helper endpoints
- Mapping (beta): https://isomemodb.com/testapi/v1/mapping

For the production api use /api instead of /testapi

4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: https://pandora-isomemo.github.io/iso-data/
template:
bootstrap: 5

0 comments on commit b811229

Please sign in to comment.