Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
c9b63ee4
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c9b63ee4
编写于
2月 24, 2016
作者:
A
Achilleas Pipinellis
提交者:
James Edwards-Jones
1月 31, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add pages job in yaml document
上级
8f7eb4e3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
2 deletion
+32
-2
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+29
-0
doc/pages/README.md
doc/pages/README.md
+3
-2
未找到文件。
doc/ci/yaml/README.md
浏览文件 @
c9b63ee4
...
@@ -1281,6 +1281,35 @@ with an API call.
...
@@ -1281,6 +1281,35 @@ with an API call.
[
Read more in the triggers documentation.
](
../triggers/README.md
)
[
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
## Validate the .gitlab-ci.yml
Each instance of GitLab CI has an embedded debug tool called Lint.
Each instance of GitLab CI has an embedded debug tool called Lint.
...
...
doc/pages/README.md
浏览文件 @
c9b63ee4
...
@@ -64,7 +64,7 @@ In brief, this is what you need to upload your website in GitLab Pages:
...
@@ -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
(ask your administrator). This is very important, so you should first make
sure you get that right.
sure you get that right.
1.
Create a project
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
)
[
`.gitlab-ci.yml`
](
../ci/yaml/README.md
)
1.
A GitLab Runner to build GitLab Pages
1.
A GitLab Runner to build GitLab Pages
...
@@ -112,7 +112,7 @@ access it under `http(s)://groupname.example.io`.
...
@@ -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:
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.
Any static content must be placed under a
`public/`
directory
1.
`artifacts`
with a path to the
`public/`
directory must be defined
1.
`artifacts`
with a path to the
`public/`
directory must be defined
...
@@ -222,3 +222,4 @@ to private, internal or public.
...
@@ -222,3 +222,4 @@ to private, internal or public.
[
pages-daemon
]:
https://gitlab.com/gitlab-org/gitlab-pages
[
pages-daemon
]:
https://gitlab.com/gitlab-org/gitlab-pages
[
gitlab ci
]:
https://about.gitlab.com/gitlab-ci
[
gitlab ci
]:
https://about.gitlab.com/gitlab-ci
[
gitlab runner
]:
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner
[
gitlab runner
]:
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner
[
pages
]:
../ci/yaml/README.md#pages
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录