2021-05-02 00:25:35 +00:00
|
|
|
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
|
2021-05-02 13:55:36 +00:00
|
|
|
- npm run export
|
|
|
|
- cp -a __sapper__/export/* public/
|
2021-05-02 00:25:35 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|