Skip to content

Commit

Permalink
configure CI job to publish preview site to GitLab Pages
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
mojavelinux committed Nov 28, 2017
1 parent 28d71bc commit c5fb712
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/build/
/node_modules/
/public/
19 changes: 16 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,32 @@ image: node:8
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:
policy: pull
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
3 changes: 3 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
= 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

image:{img-ci-status}[CI Status (GitLab CI), link={uri-ci-pipelines}]

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.
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const preview = require('./tasks/preview')
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, '_')

Expand Down

0 comments on commit c5fb712

Please sign in to comment.