File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 4040 needs : website
4141
4242 - name : Build site
43- run : pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
43+ # our versioning system+dev branch doesn't match the requirements for
44+ # develop mode = auto
45+ run : |
46+ target_ref <- "${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}"
47+ override <- if (target_ref == "main" || target_ref == "refs/heads/main") {
48+ list(development = list(mode = "release"))
49+ } else if (target_ref == "dev" || target_ref == "refs/heads/dev") {
50+ list(development = list(mode = "devel"))
51+ } else {
52+ stop("Unexpected target_ref: ", target_ref)
53+ }
54+ pkg <- pkgdown::as_pkgdown(".", override = override)
55+ cli::cli_rule("Cleaning files from old site...")
56+ pkgdown::clean_site(pkg)
57+ pkgdown::build_site(pkg, preview = FALSE, install = FALSE, new_process = FALSE)
58+ pkgdown:::build_github_pages(pkg)
4459 shell : Rscript {0}
4560
4661 - name : Deploy to GitHub pages 🚀
You can’t perform that action at this time.
0 commit comments