2018-08-26 06:56:15 +00:00
|
|
|
image: dmoonfire/mfgames-writing-js:1.1.1
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- publish
|
|
|
|
|
|
|
|
publish:
|
|
|
|
stage: publish
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
script:
|
|
|
|
# Install the basic requirements including the free fonts.
|
|
|
|
- npm ci
|
|
|
|
|
|
|
|
# Verify that the commits are good.
|
|
|
|
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
|
|
|
|
|
|
|
# Corda is a non-free font that we use for the books. It was
|
|
|
|
# picked before Source Serif Pro was created and will continue to
|
|
|
|
# be used until SSP can handle proper italics. To get around this,
|
|
|
|
# we stored it in a secret location that Gitlab CI knows about but
|
|
|
|
# everyone else does not.
|
|
|
|
- wget $CORDA_FONTS_URL/$CORDA_FONTS_BZ2BALL
|
|
|
|
- tar -xjf $CORDA_FONTS_BZ2BALL
|
|
|
|
- mkdir -p ~/.fonts/
|
|
|
|
- mv *.otf ~/.fonts/
|
|
|
|
- fc-cache -rf
|
|
|
|
|
|
|
|
# We need the covers for generation.
|
|
|
|
- mkdir -p build/repos
|
|
|
|
- git clone https://oauth2:$fedranAccessKey@gitlab.com/fedran/fedran-covers.git build/repos/fedran-covers
|
|
|
|
|
|
|
|
# Trigger the release if needed.
|
|
|
|
- npx semantic-release
|
|
|
|
|
|
|
|
# Build the files.
|
|
|
|
- npm run build
|
|
|
|
|
|
|
|
# Trigger the Fedran website to rebuild.
|
|
|
|
- "curl -X POST -F token=$fedranAccessKey -F ref=master https://gitlab.com/api/v4/projects/4027285/trigger/pipeline"
|
|
|
|
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
paths:
|
|
|
|
- "*.pdf"
|
|
|
|
- "*.epub"
|
|
|
|
- "*.mobi"
|
|
|
|
- "*.docx"
|
|
|
|
- "*.html"
|