Last active
September 17, 2021 10:37
-
-
Save yaapis/6a1c1dfe4668e6c8b0331b6b7230c7b4 to your computer and use it in GitHub Desktop.
.gitlab-ci.yml - laravel backend CI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- build | |
- deploy | |
Build: | |
stage: build | |
variables: | |
GIT_STRATEGY: clone | |
environment: | |
name: $CI_COMMIT_REF_NAME | |
script: | |
- npm i | |
- npm run dev | |
artifacts: | |
paths: | |
- public/themes | |
- public/vendor | |
- public/ckeditor | |
only: | |
- dev | |
- master | |
- stage | |
tags: | |
- node12 | |
Deploy: | |
stage: deploy | |
variables: | |
GIT_STRATEGY: clone | |
environment: | |
name: $CI_COMMIT_REF_NAME | |
script: | |
- php -v | |
- eval $(ssh-agent -s) | |
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - | |
- curl -LO https://deployer.org/releases/v6.6.0/deployer.phar | |
- php deployer.phar deploy $CI_COMMIT_REF_NAME | |
only: | |
- dev | |
- master | |
- stage | |
tags: | |
- shell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment