@@ -9,26 +9,3 @@ for (fmt in formats) {
99 res = xfun :: Rscript(c(' -e' , shQuote(cmd )))
1010 if (res != 0 ) stop(' Failed to compile the book to ' , fmt )
1111}
12-
13- # When several format are rendered, usually when make all is called,
14- # then we publish everything to bookdown.org
15- if (length(formats ) > 1 ) {
16- message(" >> Publishing Books" )
17- if (! is.na(Sys.getenv(" CI" , NA ))) {
18- xfun :: pkg_load2(" rsconnect" )
19- # On CI connect to server, using API KEY and deploy using appId
20- rsconnect :: addConnectServer(' https://bookdown.org' , ' bookdown.org' )
21- rsconnect :: connectApiUser(
22- account = ' GHA' , server = ' bookdown.org' ,
23- apiKey = Sys.getenv(' CONNECT_API_KEY' )
24- )
25- rsconnect :: deploySite(
26- appId = Sys.getenv(' CONTENT_ID' ),
27- server = ' bookdown.org' ,
28- render = ' none' , logLevel = ' verbose' ,
29- forceUpdate = TRUE )
30- } else if (Sys.getenv(' USER' ) == ' yihui' ) {
31- # for local deployment when rsconnect/ is available
32- bookdown :: publish_book(' rmarkdown' , server = ' bookdown.org' , render = ' none' )
33- }
34- }
0 commit comments