mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 11:32:47 +00:00
45 lines
962 B
YAML
45 lines
962 B
YAML
image: openlp/angular
|
|
|
|
stages:
|
|
- test
|
|
- build
|
|
- deploy
|
|
|
|
before_script:
|
|
- yarn install
|
|
|
|
lint:
|
|
stage: test
|
|
script:
|
|
- yarn lint
|
|
|
|
test:
|
|
stage: test
|
|
script:
|
|
- yarn test --no-progress --no-watch --browsers=ChromiumHeadlessCI
|
|
|
|
build:
|
|
stage: build
|
|
script:
|
|
- yarn build --no-progress --prod --aot
|
|
artifacts:
|
|
paths:
|
|
- dist/
|
|
|
|
deploy:
|
|
stage: deploy
|
|
script:
|
|
- cd dist/web-remote
|
|
- zip -r ../../remote-$CI_COMMIT_TAG.zip *
|
|
- cd ../../
|
|
- mkdir -p ~/.ssh
|
|
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
- eval $(ssh-agent -s)
|
|
- ssh-add ~/.ssh/id_rsa
|
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
|
- ssh openlp@openlp.io "mkdir -p /home/openlp/sites/get.openlp.org/www/remote/$CI_COMMIT_TAG"
|
|
- scp remote-$CI_COMMIT_TAG.zip openlp@openlp.io:/home/openlp/sites/get.openlp.org/www/remote/$CI_COMMIT_TAG/
|
|
only:
|
|
- tags
|