Skip to content
Snippets Groups Projects
Commit 928a7ccd authored by Chessmaster's avatar Chessmaster
Browse files

first try to build versioned guide

parent 679b03b7
Branches
Tags
1 merge request!7Tagging PDFs before publishing
Pipeline #23712 passed
......@@ -2,20 +2,42 @@ stages:
- build
- publish
build_guide:
build__tagged_guide:
stage: build
image: alpine
script:
- apk update
- apk add ruby asciidoctor
- gem install asciidoctor-pdf --pre
- asciidoctor-pdf -o angelguide_en.pdf guide.adoc
- asciidoctor-pdf -a lang=de -o angelguide_de.pdf guide.adoc
- export COMMIT_TIME=$(git show -s --format=%ci $CI_COMMIT_SHA | cut -c1-10)
- asciidoctor-pdf -a revnumber=$CI_COMMIT_TAG -a revdate=$COMMIT_TIME -o angelguide_en.pdf guide.adoc
- asciidoctor-pdf -a lang=de -a revnumber=$CI_COMMIT_TAG -a revdate=$COMMIT_TIME -o angelguide_de.pdf guide.adoc
artifacts:
paths:
- "angelguide_en.pdf"
- "angelguide_de.pdf"
expire_in: 12 months
only:
- master
- tags
build__tagged_guide:
stage: build
image: alpine
script:
- apk update
- apk add ruby asciidoctor
- gem install asciidoctor-pdf --pre
- export COMMIT_TIME=$(git show -s --format=%ci $CI_COMMIT_SHA | cut -c1-10)
- asciidoctor-pdf -a revnumber=CI_COMMIT_SHORT_SHA -a revdate=$COMMIT_TIME -o angelguide_en.pdf guide.adoc
- asciidoctor-pdf -a lang=de -a revnumber=CI_COMMIT_SHORT_SHA -a revdate=$COMMIT_TIME -o angelguide_de.pdf guide.adoc
artifacts:
paths:
- "angelguide_en.pdf"
- "angelguide_de.pdf"
expire_in: 12 months
except:
- tags
publish_guide:
stage: publish
......@@ -31,7 +53,6 @@ publish_guide:
- chmod 644 ~/.ssh/known_hosts
script:
- 'rsync -av angelguide_*.pdf $PUBLISH_USER@$PUBLISH_HOST:$PUBLISH_PATH'
rules:
- if: '$CI_COMMIT_REF_NAME == "master"'
when: on_success
- when: never
only:
- master
- tags
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment