sand-and-ash/.gitlab-ci.yml
D. Moonfire 415dc327d5 feat: switching Fedran theme to new version
BREAKING CHANGE: the new theme changed page numbers
2020-01-01 23:42:24 -06:00

40 lines
1.2 KiB
YAML

image: dmoonfire/mfgames-writing-js:2.0.0
stages:
- publish
publish:
stage: publish
only: [master]
tags: [docker]
script:
# Install the basic requirements including the free fonts.
- npm ci
# Verify that the commits are good.
- npx commitlint --from=$CI_BUILD_BEFORE_SHA
# We need the covers and the previous version so we can generate the
# "previously" chapter.
- mkdir -p build/repos
- git clone https://oauth2:$fedranAccessKey@gitlab.com/fedran/fedran-covers.git build/repos/fedran-covers
- 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'
# Trigger the release if needed.
- npx semantic-release
# Build the files.
- npm run upload
artifacts:
expire_in: 1 week
paths:
- "*.pdf"
- "*.epub"
- "*.mobi"
- "*.docx"
- "*.html"