Improve `pages:` job options: Use pages.publish as an artifacts.paths automatically
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
-
Use publicdirectory automatically forartifacts.pathswhenpages.publishnot defined for pages job only -
Use any value defined in pages.publishas anartifacts.pathsautomatically -
Update documentation
Examples
Simplest possible pages job:
This will use all defaults
pages.path_prefix: ''pages.publish: /publicartifacts.paths: /public
my-pages-job:
script:
- echo 'something'
pages: true
Or even shorter with the old way of specifiying pages as the job name:
pages:
script:
- echo 'something'
Fully customised pages job:
job-name:
script:
- echo 'something'
artifacts:
paths:
- other
pages:
path_prefix: 'staging'
publish: '/some-folder'
Having artifacts.paths and pages.publish means that multiple artifacts are created, so the above should be equivalent to:
job-name:
script:
- echo 'something'
artifacts:
paths:
- other
- /some-folder
pages:
path_prefix: 'staging'
publish: '/some-folder'
Related to:
Edited by Naman Jagdish Gala