Commit daf43c12 authored by Romain Lesur's avatar Romain Lesur
Browse files

Improve text

parent 5a2ccbcc
Pipeline #11802743 passed with stage
in 1 minute and 17 seconds
# Easily publish a R bookdown book with GitLab Pages
# Easily publish a R bookdown website with GitLab Pages
This repository is a bookdown demo website served on `GitLab Pages` using `GitLab CI`.
See https://rlesur.gitlab.io/bookdown-gitlab-pages
---
title: "Easily publish a R bookdown book with GitLab Pages"
title: "Easily publish a R bookdown website with GitLab Pages"
author: "Romain Lesur"
description: "This book provides a demo of a bookdown published on GitLab Pages"
description: "This book provides a demo of a bookdown website published on GitLab Pages"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
......@@ -28,7 +28,7 @@ output:
knitr::write_bib(c(.packages(), 'bookdown'), 'packages.bib')
```
Publishing a `R` [@R-base] `bookdown` [@R-bookdown] book with [`GitLab Pages`](https://docs.gitlab.com/ee/user/project/pages/index.html) is as easy as:
Publishing a `R` [@R-base] `bookdown` [@R-bookdown] website with [`GitLab Pages`](https://docs.gitlab.com/ee/user/project/pages/index.html) is as easy as:
- hosting a repository on [`GitLab`](https://gitlab.com)
- adding a configuration file to the project
......@@ -37,21 +37,22 @@ Publishing a `R` [@R-base] `bookdown` [@R-bookdown] book with [`GitLab Pages`](h
As [`GitHub`](https://www.github.com), [`GitLab`](https://gitlab.com) is a web-based [`Git`](https://git-scm.com/) repository manager. Creating a new project on [`GitLab`](https://gitlab.com) is fairly intuitive for [`GitHub`](https://www.github.com) users. [`GitLab`](https://gitlab.com) users can create unlimitate private projects for free (see [here](https://about.gitlab.com/gitlab-com/)).
[`GitLab`](https://gitlab.com) also offers a continuous integration service ([`GitLab CI`](https://docs.gitlab.com/ee/ci/quick_start/)) and a static websites hosting service ([`GitLab Pages`](https://about.gitlab.com/features/pages/)) in its free plan ^[CI pipelines are limited to 2,000 minutes per month].
[`GitLab`](https://gitlab.com) also offers a continuous integration service ([`GitLab CI`](https://docs.gitlab.com/ee/ci/quick_start/)) and a static websites hosting service ([`GitLab Pages`](https://about.gitlab.com/features/pages/)) in its free plan ^[CI pipelines are limited to 2,000 minutes per month].
These features are present in the open source software [`GitLab Community Edition (CE)`](https://about.gitlab.com/products/).
## Add a `GitLab CI` configuration file {-}
Add the following `.gitlab-ci.yml` file in the root of the project:
```{r comment=NA, class.output='yml', echo=FALSE}
```{r comment=NA, class.output='yaml', echo=FALSE}
cat(readChar("./.gitlab-ci.yml", 1e5))
```
## Read the book {-}
For explanations, see chapter \@ref(details).
When the job is done, the book is served on `GitLab Pages`.
Job status can be found in `CI / CD menu > Jobs`. An example, [here](https://gitlab.com/RLesur/bookdown-gitlab-pages/-/jobs).
## See the result {-}
When the `CI` job is done, the website is served on `GitLab Pages`.
CI jobs status can be found in `CI / CD menu > Jobs`. An example, [here](https://gitlab.com/RLesur/bookdown-gitlab-pages/-/jobs).
The address of the `GitLab Pages` project can be found in `Settings > Pages`. An example, [here](https://gitlab.com/RLesur/bookdown-gitlab-pages/pages).
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