forked from lnfernal/laravel-casino
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
36 lines (32 loc) · 1.15 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
image: docker:git
cache:
paths:
- vendor/
- node_modules/
before_script:
- echo "Before script"
building:
stage: build
script:
- echo "Build script"
services:
- docker:dind
deploy:
only:
refs:
- develop
image: alpine:latest
stage: deploy
tags:
- deployment
script:
- echo "id rsa start"
- chmod og= $ID_RSA
- echo "id rsa end"
- apk update && apk add openssh-client
- echo "ssl updated"
- ssh -i $ID_RSA -p2222 -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "cd ~/projects/casino-backend && git pull"
# - ssh -i $ID_RSA -p2222 -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "cd ~/projects/casino-backend && rm -R data"
- ssh -i $ID_RSA -p2222 -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "cd ~/projects/casino-backend && docker-compose build --no-cache"
- ssh -i $ID_RSA -p2222 -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "cd ~/projects/casino-backend && docker-compose up -d"
- ssh -i $ID_RSA -p2222 -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "cd ~/projects/casino-backend && docker exec back.izicash.bet php /var/www/html/artisan 'l5-swagger:generate'"