Commit 75645bb6 authored by Romain Lesur's avatar Romain Lesur
Browse files

Complete details

parent 50c90935
Pipeline #11833424 passed with stage
in 1 minute and 45 seconds
......@@ -5,7 +5,7 @@ A comprehensive documentation of `GitLab Pages` can be found here: https://docs.
## `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`](https://www.docker.com/) image it has to pull for executing the `CI` job.
The configuration file begins with `image` declaration. It indicates to the `GitLab Runner` which [`Docker`](https://www.docker.com/) image it has to pull for executing the `CI` job.
```{r comment=NA, class.output='yaml', echo=FALSE}
image <-
......@@ -22,3 +22,20 @@ In order to build a website with `bookdown`, you have to choose a [`Docker`](htt
Using a `Rocker` image, **you ensure the reproducibility of your `bookdown` website**.
In order to build a `GitLab Pages` website, you have to declare a `pages` job. That is the remaining lines of the `.gitlab-ci.yml` file:
```{r comment=NA, class.output='yaml', echo=FALSE}
readChar("./.gitlab-ci.yml", 1e5) %>%
strsplit("(?=\\npages:)", perl = TRUE) %>%
unlist() %>%
stringr::str_subset("pages") %>%
cat()
```
In this example, there is only a `deploy` stage, but you can add a `test` stage on any branch.
## LaTeX engine
At the time this demo guide is written, there is only one pitfall: the `rocker/verse` image does not include `xelatex` `pdf` engine.
So, you have to use `pdflatex` instead of `xelatex`.
# Credits
Combining `bookdown` and `GitLab` with `Docker` leads to a very simple workflow.
Many thanks to:
- [Yihui Xie](https://yihui.name/) for `bookdown`
- [Dirk Eddelbuettel](http://dirk.eddelbuettel.com/) and [Carl Boettiger](http://carlboettiger.info/) for `Rocker`
- [`GitLab` Core Team](https://about.gitlab.com/core-team/) for `GitLab CE`
- `Docker CE` authors
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