Improve `pages:` job option to be less verbose
Problem
When enabling multiple pages jobs a new pages:
job option was created, but the MVC version of this option is quite verbose and don't contains all pages-related ci options.
Proposal
- Move
publish
topages.publish_folder:
- We already have an issue to simplify the job description when using
publish
#398145, which can be done separately of this issue.
- We already have an issue to simplify the job description when using
The full proposal could look something like:
Pages job based on job name (Backwards compatibility):
pages:
script:
- echo 'something'
artifacts:
paths:
- dist
publish: dist
Pages job not based on name (shortest version):
This will use all defaults
pages.path_prefix: ''
pages.publish_folder: /public
artifacts.paths: /public
job-name:
script:
- echo 'something'
pages: true
Pages job not based on name (full customization):
job-name:
script:
- echo 'something'
artifacts:
paths:
- other
pages:
path_prefix: 'staging'
publish_folder: '/public'
Having artifacts.paths
and pages.publish_folder
means that multiple artifacts are created, this would be similar to:
job-name:
script:
- echo 'something'
artifacts:
paths:
- other
- /public
pages:
path_prefix: 'staging'
publish_folder: '/public'
Question to be answered
- What happens if multiple pages jobs are defined with the same attributes?
Related to:
Edited by Kassio Borges