- change output folder for preview site to public (requirement of GitLab Pages)
- add the public folder to .gitignore file
- add job to CI build that publishes preview site from master branch
- add link to preview site to the README
/build/
/node_modules/
+/public/
stages:
- setup
- verify
+- deploy
yarn:
stage: setup
- script:
- - npm install -g yarn
- - yarn --cache-folder=.yarn-cache
cache:
paths:
- node_modules/
- .yarn-cache/
+ script:
+ - npm install -g yarn
+ - yarn --cache-folder=.yarn-cache
lint:
stage: verify
cache:
paths:
- node_modules/
script: node_modules/.bin/gulp lint
+pages:
+ stage: deploy
+ only:
+ - master
+ cache:
+ policy: pull
+ paths:
+ - node_modules/
+ script: node_modules/.bin/gulp build:preview
+ artifacts:
+ paths:
+ - public
= Antora Default UI
// Project URIs:
:uri-project: https://gitlab.com/antora/antora-ui-default
+:uri-preview: https://antora.gitlab.io/antora-ui-default
:uri-ci-pipelines: {uri-project}/pipelines
:img-ci-status: {uri-project}/badges/master/pipeline.svg
This project is an archetype that demonstrates how to produce a UI bundle for use in an Antora-based documentation pipeline.
+You can preview the default UI at {uri-preview}.
+
== Copyright and License
Copyright (C) 2017 OpenDevise Inc. and the Antora Project.
const bundleName = 'ui'
const buildDir = 'build'
const previewSiteSrcDir = 'preview-site-src'
-const previewSiteDestDir = path.join(buildDir, 'preview-site')
+const previewSiteDestDir = 'public'
const srcDir = 'src'
const destDir = path.join(previewSiteDestDir, '_')