Skip to content
Snippets Groups Projects
Commit 725a56e2 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis
Browse files

Update README to reflect the current build and deployment process

[ci skip]
parent 03a417e0
No related branches found
No related tags found
1 merge request!46Update README
# Introduction
## Introduction
 
[Doc-gitlab-com](https://gitlab.com/gitlab-com/doc-gitlab-com/) generates html pages for the [GitLab documentation website](https://docs.gitlab.com/). The documentation is generated from the markdown files in /doc directory of the GitLab repo's. The conversion from markdown into html is done with [Pandoc](http://johnmacfarlane.net/pandoc/).
[Doc-gitlab-com](https://gitlab.com/gitlab-com/doc-gitlab-com/) generates HTML
pages for the [GitLab documentation website](https://docs.gitlab.com/). The
documentation is generated from the Markdown files in the `/doc` directory of
the GitLab repos. The conversion from Markdown into HTML is done with
[Pandoc](http://johnmacfarlane.net/pandoc/).
 
If you want to contribute with documentation, please add them to the corresponding project:
If you want to contribute with documentation, please add them to the
corresponding project:
 
+ [GitLab CE](https://gitlab.com/gitlab-org/gitlab-ce/)
+ [GitLab EE](https://gitlab.com/gitlab-org/gitlab-ee/)
 
And follow the [contributing guidelines](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#merge-request-guidelines) and [documentation styleguides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) of each project.
And follow the [contributing guidelines][contributing] and
[documentation styleguide][doc-styleguide] of each project.
 
# Testing
## Requirements
 
Please replace sytse with your username.
Only 2 requirements:
 
```bash
ssh sytse@doc.gitlab.com
sudo su
cd /root/doc-gitlab-com && git pull && ./generate.rb no-clone && service nginx restart
```
- Ruby
- Pandoc
 
or to also update the repo's
No version restrictions, although you'd probably be better off using the
latest of both.
 
```bash
cd /root/doc-gitlab-com && git pull && ./generate.rb && service nginx restart
```
## Generation
To build the documentation website we use the `generate.rb` script which:
1. Clones the respective repositories in `/tmp/gitlab/`.
1. Uses pandoc to create HTML documents from Markdown using `template.html` as
a template.
1. Copies the stylesheets and the index page.
By default, the site is built in the `public/` directory inside the root
directory of this project. You can override this using the `SITE_PATH`
environment variable.
No console output will be created by default during the build process. If you
want to see progress indicators, set the `PROGRESS` environment variable:
 
# Restrictions
+ All files should be in a doc/something directory, not any deeper.
+ Only png image files are supported.
# Installation
Login as **root** and execute the following commands:
```bash
apt-get update
apt-get upgrade
apt-get remove pandoc # Pandoc 1.9.1 doesn't support pipe tables.
apt-get install haskell-platform
cabal update
cabal install pandoc --ghc-options="-O0"
ln -s /root/.cabal/bin/pandoc /usr/bin/pandoc
cd /root
git clone https://gitlab.com/gitlab-com/doc-gitlab-com.git
ln -s /root/doc-gitlab-com/nginx /etc/nginx/sites-available/doc-gitlab-com
ln -s /etc/nginx/sites-available/doc-gitlab-com /etc/nginx/sites-enabled/doc-gitlab-com
rm /etc/nginx/sites-enabled/default
service nginx start
crontab -e
20 */2 * * * /root/doc-gitlab-com/generate.rb
```
PROGRESS=1 ./generate.rb
```
## Restrictions
- Only png image files are supported.
## Deployment process
We use [GitLab Pages][pages] to build and host this website. You can see
`.gitlab-ci.yml` for more information.
A [job] is used to trigger a new build whenever tests run and pass on master
branch of CE.
 
Do not forget to add the public ssh key of the server `ssh-keygen` as a deploy key to any non-public repositories in generate.rb.
[contributing]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#merge-request-guidelines
[doc-styleguide]: https://docs.gitlab.com/ce/development/doc_styleguide.html
[job]: https://gitlab.com/gitlab-org/gitlab-ce/blob/2c00d00ec1c39dbea0e0e54265027b5476b78e3c/.gitlab-ci.yml#L308-318
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment