Skip to content

Commit 68a40ac

Browse files
authored
- do_pkgdown(): Always create a .nojekyll file for prod and dev deployments (#307)
1 parent ee53e95 commit 68a40ac

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# R specific hooks: https://github.com/lorenzwalthert/precommit
33
repos:
44
- repo: https://github.com/lorenzwalthert/precommit
5-
rev: v0.1.3.9014
5+
rev: v0.2.0
66
hooks:
77
- id: style-files
88
args: [--style_pkg=styler, --style_fun=tidyverse_style]
9-
- id: roxygenize
9+
# - id: roxygenize
1010
# codemeta must be above use-tidy-description when both are used
1111
# - id: codemeta-description-updated
1212
- id: use-tidy-description

R/macro-pkgdown.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ do_pkgdown <- function(...,
114114
#' 1. [step_build_pkgdown()] in the `"deploy"` stage,
115115
#' forwarding all `...` arguments.
116116
get_stage("deploy") %>%
117-
add_step(step_build_pkgdown(!!!enquos(...)))
117+
add_step(step_build_pkgdown(!!!enquos(...))) %>%
118+
add_code_step(writeLines("", paste0(!!path, "/.nojekyll"))) %>%
119+
add_code_step(dir.create(paste0(!!path, "dev"), showWarnings = FALSE)) %>%
120+
add_code_step(writeLines("", paste0(!!path, "/dev/.nojekyll")))
118121

119122
#' 1. [step_do_push_deploy()] in the `"deploy"` stage.
120123
if (isTRUE(deploy)) {

inst/WORDLIST

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ callr
2222
CamelCase
2323
ccache
2424
CCACHE
25+
Changelog
2526
cheatsheet
2627
ci
2728
circleci
@@ -84,6 +85,7 @@ eval
8485
evans
8586
familyName
8687
fansi
88+
faq
8789
fff
8890
fi
8991
figshare
@@ -119,6 +121,7 @@ harfbuzz
119121
hdiutil
120122
homebrew
121123
Homebrew
124+
href
122125
http
123126
https
124127
hugo
@@ -182,6 +185,7 @@ mlr
182185
mtime
183186
Müller
184187
mv
188+
navbar
185189
nCCFLAGS
186190
nCFLAGS
187191
nCPP
@@ -194,6 +198,7 @@ nFC
194198
nhash
195199
nlopt
196200
NOHASHDIR
201+
nojekyll
197202
noreply
198203
nsloppiness
199204
NUM
@@ -277,6 +282,7 @@ SDKs
277282
seealso
278283
Sexpr
279284
SHA
285+
showWarnings
280286
SKD
281287
SoftwareApplication
282288
softwareRequirements
@@ -299,7 +305,9 @@ TicStep
299305
tidyverse
300306
tinytex
301307
tmp
308+
toc
302309
toolchain
310+
tooltip
303311
traceback
304312
tracebacks
305313
travis

pkgdown/_pkgdown.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ reference:
5353
- title: CRAN repository functions
5454
contents:
5555
- starts_with("repo")
56+
- title: Helpers
57+
contents:
58+
- github_helpers
5659
- title: Deprecated
5760
contents:
5861
- Deprecated

tests/testthat/out/pkgdown.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66
▶ step_rcmdcheck()
77
── deploy ───────────────────────────────────────────────────────────── stage ──
88
▶ step_build_pkgdown()
9+
▶ step_run_code(writeLines("", paste0("docs", "/.nojekyll")))
10+
▶ step_run_code(dir.create(paste0("docs", "dev"), showWarnings = FALSE))
11+
▶ step_run_code(writeLines("", paste0("docs", "/dev/.nojekyll")))

0 commit comments

Comments
 (0)