57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
image: dmoonfire/mfgames-writing-js:1.1.0
|
|
|
|
stages:
|
|
- review
|
|
- publish
|
|
|
|
review:
|
|
stage: review
|
|
only:
|
|
- master
|
|
tags:
|
|
- docker
|
|
script:
|
|
# Install the basic requirements including the free fonts.
|
|
- npm ci
|
|
|
|
# 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.
|
|
- mkdir -p build/repos
|
|
- git clone https://oauth2:$fedranAccessKey@gitlab.com/fedran/fedran-covers.git build/repos/fedran-covers
|
|
|
|
# Build the files.
|
|
- npm run build
|
|
- kindlegen *.epub
|
|
|
|
# Trigger the 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"
|
|
|
|
publish:
|
|
stage: publish
|
|
when: manual
|
|
script:
|
|
- echo Published
|
|
artifacts:
|
|
paths:
|
|
- "*.pdf"
|
|
- "*.epub"
|
|
- "*.mobi"
|
|
dependencies:
|
|
- review
|