Skip to content

Commit 6a9c29a

Browse files
authored
Merge pull request #247 from cmu-delphi/ds/doc
ci+docs: match style with epipredict
2 parents 530ffdd + 440efa9 commit 6a9c29a

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

.github/workflows/pkgdown.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ jobs:
4141
- name: Build site
4242
env:
4343
DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIDATR_GHACTIONS_DELPHI_EPIDATA_KEY }}
44-
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
44+
run: |
45+
if (startsWith("${{ github.event_name }}", "pull_request")) {
46+
mode <- ifelse("${{ github.base_ref }}" == "main", "release", "devel")
47+
} else {
48+
mode <- ifelse("${{ github.ref_name }}" == "main", "release", "devel")
49+
}
50+
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override=list(PKGDOWN_DEV_MODE=mode))
4551
shell: Rscript {0}
4652

4753
- name: Deploy to GitHub pages 🚀

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ env
1717
/Meta/
1818
.secrets
1919
epidatr.Rproj
20+
renv.lock
21+
renv/
22+
.Rprofile

_pkgdown.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,29 @@
1+
# Colors should stay consistent across epipredict & epidatr, using Carnegie
2+
# Red https://www.cmu.edu/brand/brand-guidelines/visual-identity/colors.html
13
template:
24
bootstrap: 5
35
bootswatch: cosmo
46
bslib:
57
font_scale: 1.0
6-
primary: '#C41230'
7-
link-color: '#C41230'
8-
navbar-bg: '#C41230'
9-
navbar-fg: '#f8f8f8'
10-
11-
development:
12-
mode: auto
8+
primary: "#C41230"
9+
link-color: "#C41230"
1310

1411
navbar:
15-
bg: '#C41230'
16-
fg: '#f8f8f8'
12+
bg: primary
13+
type: dark
1714

1815
home:
1916
links:
2017
- text: Get the Python client
2118
href: https://github.com/cmu-delphi/epidatpy/
22-
2319
- text: View the Delphi Website
2420
href: https://delphi.cmu.edu/
25-
2621
- text: Introduction to Delphi's Tooling Work
2722
href: https://cmu-delphi.github.io/delphi-tooling-book/
28-
2923
- text: The epiprocess R package
3024
href: https://cmu-delphi.github.io/epiprocess/
31-
3225
- text: The epipredict R package
3326
href: https://cmu-delphi.github.io/epipredict/
34-
3527
- text: The epidatasets R package
3628
href: https://cmu-delphi.github.io/epidatasets/
3729

0 commit comments

Comments
 (0)