Skip to content

Commit b80b342

Browse files
committed
add github actions for checks and pkgdown
1 parent bdb4d28 commit b80b342

File tree

9 files changed

+95
-10
lines changed

9 files changed

+95
-10
lines changed

.Rbuildignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
^data-raw$
44
^LICENSE\.md$
55
^README\.Rmd$
6+
^\.github$
7+
^_pkgdown\.yml$
8+
^docs$
9+
^pkgdown$

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
name: R-CMD-check
10+
11+
jobs:
12+
R-CMD-check:
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
R_KEEP_PKG_SOURCE: yes
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- uses: r-lib/actions/setup-r@v2
21+
with:
22+
use-public-rspm: true
23+
24+
- uses: r-lib/actions/setup-r-dependencies@v2
25+
with:
26+
extra-packages: any::rcmdcheck
27+
needs: check
28+
29+
- uses: r-lib/actions/check-r-package@v2

.github/workflows/pkgdown.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown
13+
14+
jobs:
15+
pkgdown:
16+
runs-on: ubuntu-latest
17+
# Only restrict concurrency for non-PR jobs
18+
concurrency:
19+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
20+
env:
21+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
22+
permissions:
23+
contents: write
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- uses: r-lib/actions/setup-pandoc@v2
28+
29+
- uses: r-lib/actions/setup-r@v2
30+
with:
31+
use-public-rspm: true
32+
33+
- uses: r-lib/actions/setup-r-dependencies@v2
34+
with:
35+
extra-packages: any::pkgdown, local::.
36+
needs: website
37+
38+
- name: Build site
39+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
40+
shell: Rscript {0}
41+
42+
- name: Deploy to GitHub pages 🚀
43+
if: github.event_name != 'pull_request'
44+
uses: JamesIves/[email protected]
45+
with:
46+
clean: false
47+
branch: gh-pages
48+
folder: docs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.RData
44
.Ruserdata
55
.DS_Store
6+
docs

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ Remotes:
2828
Encoding: UTF-8
2929
LazyData: true
3030
RoxygenNote: 7.2.3
31+
URL: https://cmu-delphi.github.io/epidatasets/

README.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ knitr::opts_chunk$set(
1616
# epidatasets
1717

1818
<!-- badges: start -->
19+
[![R-CMD-check](https://github.com/cmu-delphi/epidatasets/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/cmu-delphi/epidatasets/actions/workflows/R-CMD-check.yaml)
1920
<!-- badges: end -->
2021

2122
This package contains data sets used to compile vignettes

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# epidatasets
55

66
<!-- badges: start -->
7+
8+
[![R-CMD-check](https://github.com/cmu-delphi/epidatasets/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/cmu-delphi/epidatasets/actions/workflows/R-CMD-check.yaml)
79
<!-- badges: end -->
810

911
This package contains data sets used to compile vignettes and other

_pkgdown.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
url: https://cmu-delphi.github.io/epipredict/
1+
url: https://cmu-delphi.github.io/epidatasets/
22
template:
33
bootstrap: 5
44
bootswatch: cosmo
55
bslib:
66
font_scale: 1.0
7-
primary: "#C41230" # dark blue active text
8-
link-color: "#C41230" # brighter link color, contrast 4.52
9-
# navbar
10-
navbar-bg: "#C41230" # match to site bg
11-
navbar-fg: "#f8f8f8"
12-
7+
primary: '#C41230'
8+
link-color: '#C41230'
9+
navbar-bg: '#C41230'
10+
navbar-fg: '#f8f8f8'
1311
navbar:
14-
bg: "#C41230"
15-
fg: "#f8f8f8"
16-
12+
bg: '#C41230'
13+
fg: '#f8f8f8'
1714
home:
1815
links:
1916
- text: The epiprocess R package
@@ -22,3 +19,4 @@ home:
2219
href: https://cmu-delphi.github.io/covidcast/covidcastR/
2320
- text: The epidatr R package
2421
href: https://github.com/cmu-delphi/epidatr/
22+

0 commit comments

Comments
 (0)