Update .gitlab-ci.yml for build fix

This commit is contained in:
Igor Brylyov 2021-11-05 17:22:28 +03:00
parent 7223c8636d
commit fe5b799f6d

View file

@ -1,19 +1,27 @@
image: node:latest
image: node:15.12-alpine3.13
# allow caching for faster deployment
cache:
paths:
- node_modules/
- public/
- .cache/
stages:
- test
- deploy
test:
stage: test
script:
- cd website
- yarn install
- yarn build
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
pages:
stage: deploy
script:
- yarn install
- yarn build:gitlab
- cd website
- yarn install
- yarn build
- mv ./build ../public
artifacts:
paths:
- public
only:
- master
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH