Commit 50c90935 authored by Romain Lesur's avatar Romain Lesur
Browse files

More details

parent acbb947d
Pipeline #11823510 passed with stage
in 1 minute and 50 seconds
......@@ -3,8 +3,22 @@
A comprehensive documentation of `GitLab Pages` can be found here:
## `GitLab CI` configuration file {#CI-file-details}
`GitLab CI` configuration file is a `YAML` file.
The the configuration file begins with `image` declaration. It indicates to the `GitLab Runner` which [`Docker`]( image it has to pull for executing the `CI` job.
```{r comment=NA, class.output='yaml', echo=FALSE}
readLines("./.gitlab-ci.yml") %>%
grep("image:", ., fixed = TRUE)
image <-
readLines("./.gitlab-ci.yml") %>%
stringr::str_subset("image") %T>%
cat() %>%
yaml::yaml.load() %$%
image %>%
stringr::str_split(":") %>%
In order to build a website with `bookdown`, you have to choose a [`Docker`]( image with `bookdown` installed. In this example, the `r image[1] %>% paste0("[\u0060", ., "\u0060](", ., ")")` image is used: [`Rocker`]( is the [official `R` image for `Docker`]( I am a newbie with [`Docker`]( and I recommend this [rOpenSci]('s [Docker tutorial for reproducible research](
Using a `Rocker` image, **you ensure the reproducibility of your `bookdown` website**.
......@@ -30,7 +30,6 @@ output:
```{r write-bib, include=FALSE}
knitr::write_bib(c(.packages(), 'bookdown'), 'packages.bib')
......@@ -50,7 +49,7 @@ These features are also present in the open source software [`GitLab Community E
## Add a `GitLab CI` configuration file {-}
Add the following `.gitlab-ci.yml` file in the root of the project:
```{r write-ci-file, comment=NA, class.output='yaml', echo=FALSE}
```{r insert-ci-file, comment=NA, class.output='yaml', echo=FALSE}
cat(readChar("./.gitlab-ci.yml", 1e5))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment