Use the same path of the docs site as in production

This started with
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24339 where a
broken link was introduced, but the lint checker never caught it.

The docs-lint job does the following:

```yaml
  script:
    - mv doc/ /tmp/gitlab-docs/content/
    - cd /tmp/gitlab-docs
    # Build HTML from Markdown
    - bundle exec nanoc
    # Check the internal links
    - bundle exec nanoc check internal_links
```

It moves the `doc/` dir inside `content` where Nanoc is expecting the
markdown files to be. It then builds the site and finally checks for
the links. If the built website was deployed to production, that would
be under `docs.gitlab.com/doc`.

The interesting part here is that
`[the logs](/doc/administration/logs.md#productionlog)`
translates to `<a href="/doc/administration/logs.html#productionlog>`,
so, Nanoc correctly sees this as an existing file!

This MR changes the path of the docs content to be equal to
$DOCS_GITLAB_REPO_SUFFIX which is defined as an environment
variable and takes the value of the slug of each project:
'ce', 'ee', 'omnibus', 'runner'.
This commit is contained in:
Achilleas Pipinellis 2019-01-23 19:06:41 +01:00
parent 768475bd78
commit 9060941162
No known key found for this signature in database
GPG Key ID: A0996FBD3E92C17B
1 changed files with 1 additions and 1 deletions

View File

@ -546,7 +546,7 @@ docs lint:
script:
- scripts/lint-doc.sh
- scripts/lint-changelog-yaml
- mv doc/ /tmp/gitlab-docs/content/
- mv doc/ /tmp/gitlab-docs/content/$DOCS_GITLAB_REPO_SUFFIX
- cd /tmp/gitlab-docs
# Build HTML from Markdown
- bundle exec nanoc