Skip to content

Commit 97d17e8

Browse files
committed
back to our custom workflow, no color handling
1 parent a2f2f44 commit 97d17e8

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/pkgdown.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,22 @@ jobs:
4242
needs: website
4343

4444
- name: Build site
45-
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
45+
# our versioning system+dev branch doesn't match the requirements for
46+
# develop mode = auto
47+
run: |
48+
target_ref <- "${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}"
49+
override <- if (target_ref == "main" || target_ref == "refs/heads/main") {
50+
list(development = list(mode = "release"))
51+
} else if (target_ref == "dev" || target_ref == "refs/heads/dev") {
52+
list(development = list(mode = "devel"))
53+
} else {
54+
stop("Unexpected target_ref: ", target_ref)
55+
}
56+
pkg <- pkgdown::as_pkgdown(".", override = override)
57+
cli::cli_rule("Cleaning files from old site...")
58+
pkgdown::clean_site(pkg)
59+
pkgdown::build_site(pkg, preview = FALSE, install = FALSE, new_process = FALSE)
60+
pkgdown:::build_github_pages(pkg)
4661
shell: Rscript {0}
4762

4863
- name: Deploy to GitHub pages 🚀

_pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
development:
2-
mode: auto
2+
mode: devel
33

44
template:
55
package: delphidocs

0 commit comments

Comments
 (0)