From 798837fc24ba3fa0ad5eb7ef09fbaa7b02a2ca8a Mon Sep 17 00:00:00 2001 From: Dan Date: Sun, 2 May 2021 00:25:35 +0000 Subject: [PATCH] Add .gitlab-ci.yml --- .gitlab-ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..b277014 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,25 @@ +image: "node:lts-alpine" + +before_script: + - npm install --also=dev + +# These folders are cached between builds +# http://docs.gitlab.com/ce/ci/yaml/README.html#cache +cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - node_modules/ + # Enables git-lab CI caching. Both .cache and public must be cached, otherwise builds will fail. + - .cache/ + - public/ + +pages: + script: + - mkdir public/ || true + - npm run export -- --basepath $CI_PROJECT_NAME + - cp -a __sapper__/export/$CI_PROJECT_NAME/* public/ + artifacts: + paths: + - public + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH