Skip to content

Commit 440efa9

Browse files
committed
ci: match pkgdown with epiprocess
1 parent c310589 commit 440efa9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
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 🚀

0 commit comments

Comments
 (0)