Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
c9b63ee4
Commit
c9b63ee4
authored
Feb 24, 2016
by
Achilleas Pipinellis
Committed by
James Edwards-Jones
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pages job in yaml document
parent
8f7eb4e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+29
-0
doc/pages/README.md
doc/pages/README.md
+3
-2
No files found.
doc/ci/yaml/README.md
View file @
c9b63ee4
...
...
@@ -1281,6 +1281,35 @@ with an API call.
[
Read more in the triggers documentation.
](
../triggers/README.md
)
### pages
`pages`
is a special job that is used to upload static content to GitLab that
can be used to serve your website. It has a special syntax, so the two
requirements below must be met:
1.
Any static content must be placed under a
`public/`
directory
1.
`artifacts`
with a path to the
`public/`
directory must be defined
The example below simply moves all files from the root of the project to the
`public/`
directory. The
`.public`
workaround is so
`cp`
doesn't also copy
`public/`
to itself in an infinite loop:
```
pages:
stage: deploy
script:
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public
only:
- master
```
Read more on
[
GitLab Pages user documentation
](
../../pages/README.md
)
.
## Validate the .gitlab-ci.yml
Each instance of GitLab CI has an embedded debug tool called Lint.
...
...
doc/pages/README.md
View file @
c9b63ee4
...
...
@@ -64,7 +64,7 @@ In brief, this is what you need to upload your website in GitLab Pages:
(ask your administrator). This is very important, so you should first make
sure you get that right.
1.
Create a project
1.
Provide a specific job named
[
`pages`
]
(
../ci/yaml/README.md#pages
)
in
1.
Provide a specific job named
[
`pages`
]
[
pages
]
in
[
`.gitlab-ci.yml`
](
../ci/yaml/README.md
)
1.
A GitLab Runner to build GitLab Pages
...
...
@@ -112,7 +112,7 @@ access it under `http(s)://groupname.example.io`.
To make use of GitLab Pages, your
`.gitlab-ci.yml`
must follow the rules below:
1.
A special
`pages`
job must be defined
1.
A special
[
`pages`
][
pages
]
job must be defined
1.
Any static content must be placed under a
`public/`
directory
1.
`artifacts`
with a path to the
`public/`
directory must be defined
...
...
@@ -222,3 +222,4 @@ to private, internal or public.
[
pages-daemon
]:
https://gitlab.com/gitlab-org/gitlab-pages
[
gitlab ci
]:
https://about.gitlab.com/gitlab-ci
[
gitlab runner
]:
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner
[
pages
]:
../ci/yaml/README.md#pages
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment