Skip to content

Commit

Permalink
revert to custom workflow, no special colors
Browse files Browse the repository at this point in the history
  • Loading branch information
dajmcdon committed Nov 13, 2024
1 parent b657979 commit bc51e8a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,22 @@ jobs:
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
# our versioning system+dev branch doesn't match the requirements for
# develop mode = auto
run: |
target_ref <- "${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}"
override <- if (target_ref == "main" || target_ref == "refs/heads/main") {
list(development = list(mode = "release"))
} else if (target_ref == "dev" || target_ref == "refs/heads/dev") {
list(development = list(mode = "devel"))
} else {
stop("Unexpected target_ref: ", target_ref)
}
pkg <- pkgdown::as_pkgdown(".", override = override)
cli::cli_rule("Cleaning files from old site...")
pkgdown::clean_site(pkg)
pkgdown::build_site(pkg, preview = FALSE, install = FALSE, new_process = FALSE)
pkgdown:::build_github_pages(pkg)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
development:
mode: auto
mode: devel

template:
package: delphidocs
Expand Down

0 comments on commit bc51e8a

Please sign in to comment.