Presentations-revealjs/.gitlab-ci.yml

76 lines
1.8 KiB
YAML
Raw Permalink Normal View History

stages:
- build-deps
- build
- deploy
variables:
GIT_SUBMODULE_STRATEGY: recursive
prepare_folders:
environment: $CI_COMMIT_BRANCH
stage: .pre
image: alpine:latest
script:
- mkdir -p .public
- mkdir -p .public/docs
- chown -R 1000:1000 .public/docs
cache:
paths:
- .public
rules:
- if: $CI_COMMIT_BRANCH =~ /^make/
render_pdf:
environment: $CI_COMMIT_BRANCH
stage: build-deps
when: manual
image:
name: astefanutti/decktape
entrypoint: ["/bin/sh", "-c"]
script:
- "node /decktape/decktape.js -s 2560x1440 reveal --chrome-path chromium-browser --chrome-arg=--no-sandbox --chrome-arg=--disable-web-security index.html .public/docs/slide.pdf"
cache:
paths:
- .public
artifacts:
paths:
- .public/docs
expire_in: 2 week
rules:
- if: $CI_COMMIT_BRANCH =~ /^make/
render_ppt:
needs: [render_pdf]
environment: $CI_COMMIT_BRANCH
stage: build
when: manual
image:
name: linuxserver/libreoffice
entrypoint: ["/bin/sh", "-c"]
script:
- 'soffice --headless --infilter="impress_pdf_import" --convert-to "pptx:Impress Office Open XML" .public/docs/slide.pdf --outdir .public/docs/'
cache:
paths:
- .public
artifacts:
paths:
- .public/docs
expire_in: 2 week
rules:
- if: $CI_COMMIT_BRANCH =~ /^make/
pages:
environment: $CI_COMMIT_BRANCH
stage: deploy
when: manual
script:
- cp -r * .public
- mv .public/custom_files/gulpfile.js .public/reveal.js/
- '[ -d "public/$CI_COMMIT_BRANCH" ] && { rm -rf public/$CI_COMMIT_BRANCH/*; mv .public/* public/$CI_COMMIT_BRANCH/; } || { mkdir -p public/$CI_COMMIT_BRANCH; mv .public/* public/$CI_COMMIT_BRANCH/; }'
cache:
paths:
- .public
- public
rules:
- if: $CI_COMMIT_BRANCH =~ /^make/