-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
43 lines (39 loc) · 1.05 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
37
38
39
40
41
42
43
image: registry.gitlab.com/tomctech/bref-symfony-ci-docker:v1-0
cache:
paths:
- vendor/
- node_modules/
stages:
- deploy
dev:
stage: deploy
only:
- develop
before_script:
- export SITE_VERSION=d-${CI_COMMIT_SHORT_SHA}
- composer install --prefer-dist --optimize-autoloader
- php bin/console cache:warmup --env=dev
- yarn install
- yarn dev
script:
- serverless deploy --stage dev --param="SITE_VERSION=d-${CI_COMMIT_SHORT_SHA}" --verbose --force
environment:
name: dev
url: https://dev.symfony-bref-starter.com
prod:
stage: deploy
when: manual
only:
- master
before_script:
- export SITE_VERSION=p-${CI_COMMIT_SHORT_SHA}
- composer install --prefer-dist --optimize-autoloader --no-dev
- php bin/console cache:warmup --env=prod
- yarn install
- yarn build
- yarn build:email
script:
- SLS_DEBUG=true serverless deploy --stage prod --param="SITE_VERSION=p-${CI_COMMIT_SHORT_SHA}" --verbose --force
environment:
name: prod
url: https://symfony-bref-starter.com