mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 03:22:48 +00:00
Merge branch 'deploy-only-tags' into 'master'
Fix the CI deployment job to only deploy on tags See merge request openlp/web-remote!10
This commit is contained in:
commit
1a7bed1519
@ -29,16 +29,16 @@ build:
|
|||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
|
- if [[ "$CI_COMMIT_TAG" == "" ]]; then exit 0; fi
|
||||||
- cd dist/web-remote
|
- cd dist/web-remote
|
||||||
- zip -r ../../remote-$CI_COMMIT_TAG.zip *
|
- zip -r ../../remote-$CI_COMMIT_TAG.zip *
|
||||||
- cd ../../
|
- d ../../
|
||||||
- mkdir -p ~/.ssh
|
- cho "$CI_COMMIT_TAG" > version.txt
|
||||||
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
- kdir -p ~/.ssh
|
||||||
- chmod 600 ~/.ssh/id_rsa
|
- cho "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||||
- eval $(ssh-agent -s)
|
- hmod 600 ~/.ssh/id_rsa
|
||||||
- ssh-add ~/.ssh/id_rsa
|
- val $(ssh-agent -s)
|
||||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
- sh-add ~/.ssh/id_rsa
|
||||||
- ssh openlp@openlp.io "mkdir -p /home/openlp/sites/get.openlp.org/www/remote/$CI_COMMIT_TAG"
|
- '[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||||
- scp remote-$CI_COMMIT_TAG.zip openlp@openlp.io:/home/openlp/sites/get.openlp.org/www/remote/$CI_COMMIT_TAG/
|
- sh openlp@openlp.io "mkdir -p /home/openlp/sites/get.openlp.org/www/remote/$CI_COMMIT_TAG"
|
||||||
only:
|
- cp version.txt remote-$CI_COMMIT_TAG.zip openlp@openlp.io:/home/openlp/sites/get.openlp.org/www/remote/$CI_COMMIT_TAG/
|
||||||
- tags
|
|
||||||
|
Loading…
Reference in New Issue
Block a user