diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..bcac383 --- /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 + - cp -a __sapper__/export/* public/ + artifacts: + paths: + - public + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH diff --git a/package.json b/package.json index 142bba2..74a255f 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "description": "TODO", "version": "0.0.1", "scripts": { - "dev": "sapper dev", - "build": "sapper build --legacy", - "export": "sapper export --legacy", + "dev": "sapper dev --hot=false", + "build": "sapper build", + "export": "sapper export", "start": "node __sapper__/build" }, "dependencies": {