From 672415f4359eff0f33cd22d7f54204b6c1868d93 Mon Sep 17 00:00:00 2001 From: Alexandre Simao Date: Tue, 28 Feb 2023 11:47:54 +0100 Subject: [PATCH] feat: presentation pdf export and serve $URL/slides/slide.pdf --- .gitlab-ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b41b28d..6cbc479 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,21 +1,61 @@ -variables: - GIT_SUBMODULE_STRATEGY: recursive - PUBLIC_PATH: public/$CI_COMMIT_BRANCH +stages: + - build + - 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: environment: $CI_COMMIT_BRANCH + variables: + GIT_SUBMODULE_STRATEGY: recursive stage: deploy when: manual script: - - mkdir .public - 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 artifacts: paths: - public rules: - if: $CI_COMMIT_BRANCH =~ /^make/ +