Skip to content

Commit

Permalink
Merge 4d2875a into 54654d5
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy authored Feb 25, 2022
2 parents 54654d5 + 4d2875a commit f7a4d29
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ jobs:
# Run bookdown rendering
- name: Run bookdown render
id: bookdown
run: Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')"
run: |
echo bookdown::gitbook(lib_dir = 'https://raw.githubusercontent.com/jhudsl/OTTR_Template/$branch_name/docs/libs/')
# Run TOC-less version
# Rendered content for Leanpub and Coursera is very similar.
Expand Down
31 changes: 31 additions & 0 deletions scripts/update-preview.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env Rscript

# Written by Candace Savonen Sept 2021

if (!("optparse" %in% installed.packages())){
install.packages("optparse")
}

library(optparse)

option_list <- list(
optparse::make_option(
c("--repo"),
type = "character",
default = NULL,
help = "GitHub repository name, e.g. jhudsl/OTTR_Template",
),
optparse::make_option(
c("--git_pat"),
type = "character",
default = NULL,
help = "GitHub personal access token",
)
)

# Read the arguments passed
opt_parser <- optparse::OptionParser(option_list = option_list)
opt <- optparse::parse_args(opt_parser)

repo <- opt$repo
git_pat <- opt$git_pat

0 comments on commit f7a4d29

Please sign in to comment.