2020-01-02 05:42:24 +00:00
|
|
|
image: dmoonfire/mfgames-writing-js:2.0.0
|
2018-08-26 06:56:20 +00:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- publish
|
|
|
|
|
|
|
|
publish:
|
|
|
|
stage: publish
|
2020-01-02 05:42:24 +00:00
|
|
|
only: [master]
|
|
|
|
tags: [docker]
|
2018-08-26 06:56:20 +00:00
|
|
|
script:
|
|
|
|
# Install the basic requirements including the free fonts.
|
|
|
|
- npm ci
|
|
|
|
|
|
|
|
# Verify that the commits are good.
|
2019-04-16 00:13:17 +00:00
|
|
|
- npx commitlint --from=$CI_BUILD_BEFORE_SHA
|
2018-08-26 06:56:20 +00:00
|
|
|
|
2018-08-26 07:16:41 +00:00
|
|
|
# We need the covers and the previous version so we can generate the
|
|
|
|
# "previously" chapter.
|
2018-08-26 06:56:20 +00:00
|
|
|
- mkdir -p build/repos
|
|
|
|
- git clone https://oauth2:$fedranAccessKey@gitlab.com/fedran/fedran-covers.git build/repos/fedran-covers
|
2018-08-26 07:16:41 +00:00
|
|
|
- git clone https://oauth2:$fedranAccessKey@gitlab.com/fedran/sand-and-blood.git build/repos/sand-and-blood
|
|
|
|
- 'echo "---" > build/previously.markdown'
|
|
|
|
- 'echo "title: Previously" >> build/previously.markdown'
|
|
|
|
- 'echo "---" >> build/previously.markdown'
|
|
|
|
- 'cat build/repos/sand-and-blood/spoilers/plot.markdown >> build/previously.markdown'
|
2018-08-26 06:56:20 +00:00
|
|
|
|
|
|
|
# Trigger the release if needed.
|
|
|
|
- npx semantic-release
|
|
|
|
|
2018-08-26 07:16:41 +00:00
|
|
|
# Build the files.
|
2020-01-02 05:42:24 +00:00
|
|
|
- npm run upload
|
2018-08-26 06:56:20 +00:00
|
|
|
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
paths:
|
|
|
|
- "*.pdf"
|
|
|
|
- "*.epub"
|
|
|
|
- "*.mobi"
|
|
|
|
- "*.docx"
|
|
|
|
- "*.html"
|