feat: presentation pdf export and serve

$URL/slides/slide.pdf
This commit is contained in:
Alexandre Simao 2023-02-28 11:47:54 +01:00
parent 86f78a7fff
commit 672415f435
No known key found for this signature in database
GPG Key ID: DFD784DB2A6F7A07

View File

@ -1,21 +1,61 @@
variables: stages:
GIT_SUBMODULE_STRATEGY: recursive - build
PUBLIC_PATH: public/$CI_COMMIT_BRANCH - deploy
prepare_folders:
environment: $CI_COMMIT_BRANCH
stage: .pre
image: alpine:latest
script:
- mkdir -p .public
- mkdir -p .public/slides
- chown -R 1000:1000 .public/slides
cache:
paths:
- .public
artifacts:
paths:
- .public
rules:
- if: $CI_COMMIT_BRANCH =~ /^make/
export:
environment: $CI_COMMIT_BRANCH
variables:
WORK_PATH: "public/$CI_COMMIT_BRANCH"
stage: build
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/slides/slide.pdf"
cache:
paths:
- .public
artifacts:
paths:
- .public/slides
rules:
- if: $CI_COMMIT_BRANCH =~ /^make/
pages: pages:
environment: $CI_COMMIT_BRANCH environment: $CI_COMMIT_BRANCH
variables:
GIT_SUBMODULE_STRATEGY: recursive
stage: deploy stage: deploy
when: manual when: manual
script: script:
- mkdir .public
- cp -r * .public - cp -r * .public
- mv .public/custom_files/gulpfile.js .public/reveal.js/ - 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/; }' - '[ -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: cache:
paths: paths:
- .public
- public - public
artifacts: artifacts:
paths: paths:
- public - public
rules: rules:
- if: $CI_COMMIT_BRANCH =~ /^make/ - if: $CI_COMMIT_BRANCH =~ /^make/