Created
September 19, 2022 15:37
-
-
Save finoghentov/d9d7bb4260e7df330a9daa1ee899d433 to your computer and use it in GitHub Desktop.
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
image: lorisleiva/laravel-docker:latest | |
composer: | |
stage: build | |
script: | |
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts | |
- cp .env.example .env | |
- php artisan key:generate | |
artifacts: | |
expire_in: 1 month | |
paths: | |
- vendor/ | |
- .env | |
cache: | |
key: ${CI_COMMIT_REF_SLUG}-composer | |
paths: | |
- vendor/ | |
phpunit: | |
stage: test | |
dependencies: | |
- composer | |
script: | |
- phpunit --coverage-text --colors=never | |
.init_ssh: &init_ssh | | |
eval $(ssh-agent -s) | |
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null | |
mkdir -p ~/.ssh | |
chmod 700 ~/.ssh | |
[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config | |
staging: | |
stage: deploy | |
script: | |
- *init_ssh | |
- ls | |
- php artisan deploy 3.92.211.64 -s upload | |
environment: | |
name: staging | |
url: http://dev.yourdomain.com | |
only: | |
- master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment