Skip to content
代码片段 群组 项目
未验证 提交 6ef58c05 编辑于 作者: Marcin Sedlak-Jakubowski's avatar Marcin Sedlak-Jakubowski 提交者: GitLab
浏览文件

Review user-defined job names Pages doc

上级 7dc3cc4e
No related branches found
No related tags found
无相关合并请求
...@@ -412,41 +412,43 @@ To restore a stopped deployment that has not been deleted yet, see ...@@ -412,41 +412,43 @@ To restore a stopped deployment that has not been deleted yet, see
Parallel Pages deployments, created by a merge request with a `path_prefix`, are automatically deleted when the Parallel Pages deployments, created by a merge request with a `path_prefix`, are automatically deleted when the
merge request is closed or merged. merge request is closed or merged.
## User defined job names ## User-defined job names
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/232505) in GitLab 17.5 with a flag `customizable_pages_job_name`, disabled by default. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/232505) in GitLab 17.5 with a flag `customizable_pages_job_name`, disabled by default.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169095) in GitLab 17.6. > - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169095) in GitLab 17.6. Feature flag `customizable_pages_job_name` removed.
To trigger a pages deployment from any job, include the `pages` property in the To trigger a Pages deployment from any job, include the `pages` property in the
job definition. It can either be a hash or simply a boolean set to `true` job definition. It can either be a hash or a Boolean set to `true`.
For example, using `true`:
```yaml ```yaml
deploy-my-pages-site: deploy-pages-review-app:
stage: deploy stage: deploy
script: script:
- npm run build - npm run build
pages: true pages:
path_prefix: '/_staging'
artifacts: artifacts:
paths: paths:
- public - public
``` ```
This also works: For example, using a hash:
```yaml ```yaml
deploy-pages-review-app: deploy-my-pages-site:
stage: deploy stage: deploy
script: script:
- npm run build - npm run build
pages: pages: true
path_prefix: '/_staging'
artifacts: artifacts:
paths: paths:
- public - public
``` ```
If the `pages` property of a job named `pages` is set to `false`, no If the `pages` property of a job named `pages` is set to `false`, no
deployment will be triggered. deployment is triggered:
```yaml ```yaml
pages: pages:
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册