Skip to content

pkgdown fixes, DEVELOPMENT release notes #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: pkgdown

jobs:
pkgdown:
# only build docs on the main repository and not forks
if: github.repository_owner == 'cmu-delphi'
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
Expand All @@ -39,19 +40,21 @@ jobs:
needs: website

- name: Build site
# - target_ref gets the ref from a different variable, depending on the event
# - override allows us to set the pkgdown mode and version_label
# - mode: release is the standard build mode, devel places the site in /dev
# - version_label: 'light' and 'success' are CSS labels for Bootswatch: Cosmo
# https://bootswatch.com/cosmo/
# - we use pkgdown:::build_github_pages to build the site because of an issue in pkgdown
# https://github.com/r-lib/pkgdown/issues/2257
run: |
override <- if (startsWith("${{ github.event_name }}", "pull_request")) {
if ("${{ github.base_ref }}" == "main") {
list(development = list(mode = "release", version_label = "light"))
} else {
list(development = list(mode = "devel", version_label = "success"))
}
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", version_label = "light"))
} else if (target_ref == "dev" || target_ref == "refs/heads/dev") {
list(development = list(mode = "devel", version_label = "success"))
} else {
if ("${{ github.ref_name }}" == "main") {
list(development = list(mode = "release", version_label = "light"))
} else {
list(development = list(mode = "devel", version_label = "success"))
}
stop("Unexpected target_ref: ", target_ref)
}
pkg <- pkgdown::as_pkgdown(".", override = override)
cli::cli_rule("Cleaning files from old site...")
Expand Down
24 changes: 14 additions & 10 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ Please follow the guidelines in the [PR template document](.github/pull_request_

Open a release issue and then copy and follow this checklist in the issue (modified from the checklist generated by `usethis::use_release_issue(version = "1.0.2")`):

- [ ] `git pull`
- [ ] Check [current CRAN check results](https://cran.rstudio.org/web/checks/check_results_epidatr.html)

Open a release issue and then copy and follow this checklist in the issue (modified from the checklist generated by `usethis::use_release_issue(version = "1.0.2")`):

- [ ] `git pull` on `dev` branch.
- [ ] Make sure all changes are committed and pushed.
- [ ] Check [current CRAN check results](https://cran.rstudio.org/web/checks/check_results_epiprocess.html).
- [ ] `devtools::check(".", manual = TRUE, env_vars = c(NOT_CRAN = "false"))`.
- Aim for 10/10, no notes.
- [ ] If check works well enough, merge to main. Otherwise open a PR to fix up.
Expand All @@ -61,20 +65,20 @@ Open a release issue and then copy and follow this checklist in the issue (modif
- This may choke on the MIT license url, and that's ok.
- [ ] `devtools::build_readme()`
- [ ] `devtools::check_win_devel()`
- [ ] Check email for problems
- [ ] Have maintainer ("cre" in description) check email for problems.
- [ ] `revdepcheck::revdep_check(num_workers = 4)`.
- This may choke, it is very sensitive to the binary versions of packages on a given system. Either bypass or ask someone else to run it if you're concerned.
- [ ] Update `cran-comments.md`
- [ ] PR with any changes
- [ ] PR with any changes (and go through the list again) into `dev` and run through the list again.

Submit to CRAN:

- [ ] `devtools::submit_cran()`
- [ ] Approve email
- [ ] `devtools::submit_cran()`.
- [ ] Maintainer approves email.

Wait for CRAN...

- [ ] Accepted :tada:
- [ ] `dev`
- [ ] `usethis::use_github_release(publish = FALSE)` (publish off, otherwise it won't push).
- [ ] check the release notes and publish the branch on github
- [ ] If accepted :tada:, move to next steps. If rejected, fix and resubmit.
- [ ] Open and merge a PR containing any updates made to `main` back to `dev`.
- [ ] `usethis::use_github_release(publish = FALSE)` (publish off, otherwise it won't push) will create a draft release based on the commit hash in CRAN-SUBMISSION and push a tag to the GitHub repo.
- [ ] Go to the repo, verify the release notes, and publish when ready.
10 changes: 7 additions & 3 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Colors should stay consistent across epipredict & epidatr, using Carnegie
# Red https://www.cmu.edu/brand/brand-guidelines/visual-identity/colors.html
# Colors should stay consistent across epipredict, epiprocess, and epidatr,
# using Carnegie Red
# https://www.cmu.edu/brand/brand-guidelines/visual-identity/colors.html

# This is to give a default value to the `mode` parameter in the
# `pkgdown::build_site` function. This is useful when building the site locally,
Expand All @@ -15,11 +16,14 @@ template:
bslib:
font_scale: 1.0
primary: "#C41230"
success: "#B4D43C"
link-color: "#C41230"

navbar:
bg: primary
type: dark
type: light

url: https://cmu-delphi.github.io/epidatr/

home:
links:
Expand Down