public-gateway-cacher/.gitlab-ci.yml

45 lines
727 B
YAML
Raw Normal View History

2022-03-10 05:05:10 +00:00
image: node:latest
2019-11-29 02:20:50 +00:00
before_script:
2022-03-11 03:20:29 +00:00
- curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@6
- pnpm config set store-dir .pnpm-store
- pnpm i
2019-11-29 02:20:50 +00:00
2022-03-10 04:57:47 +00:00
variables:
# https://stackoverflow.com/a/69746937/5083247
NODE_OPTIONS: --openssl-legacy-provider
2019-11-29 02:20:50 +00:00
cache:
2019-12-03 06:02:57 +00:00
key:
files:
2022-03-11 03:20:29 +00:00
- pnpm-lock.yaml
2019-11-29 02:20:50 +00:00
paths:
2022-03-11 03:20:29 +00:00
- .pnpm-store
2019-11-29 02:20:50 +00:00
build:
stage: build
script:
2022-03-11 03:20:29 +00:00
- pnpm run build:prod
2019-11-29 02:20:50 +00:00
artifacts:
paths:
2019-11-29 03:10:55 +00:00
- dist/angular
2019-11-29 02:20:50 +00:00
test:
stage: test
script:
2022-03-11 07:06:35 +00:00
- pnpx ng lint
- pnpx prettier --check .
2019-11-29 03:16:33 +00:00
pages:
2019-11-29 02:20:50 +00:00
stage: deploy
script:
2022-03-11 03:20:29 +00:00
- pnpm run build:gitlab
2019-11-29 02:20:50 +00:00
- mv dist/angular public
- cp public/index.html public/404.html
artifacts:
paths:
2019-12-03 06:02:57 +00:00
- public
2019-11-29 02:20:50 +00:00
only:
- master
2019-11-29 03:16:33 +00:00
- pages