forked from mattermost/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
48 lines (43 loc) · 929 Bytes
/
.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
44
45
46
47
48
# This run in the mattermost gitlab internal instace
variables:
AWS_DEFAULT_REGION: "us-east-1"
IMAGE_BUILD: python:3.7
IMAGE_AWS_CI: $CI_REGISTRY/images/aws-ci:2.1.1-1
stages:
- build
- deploy
build-package:
stage: build
image: $IMAGE_BUILD
before_script:
- make python-deps
script:
- make html
artifacts:
paths:
- ./build/html
expire_in: 2 hours
only:
refs:
- master
- staging
s3-release-prod:
image: $IMAGE_AWS_CI
stage: deploy
script:
- aws s3 cp build/html s3://docs.mattermost.com/ --recursive --cache-control no-cache --acl public-read
needs:
- build-package
only:
refs:
- master
s3-release-staging:
image: $IMAGE_AWS_CI
stage: deploy
script:
- aws s3 cp build/html s3://docs-stagging.mattermost.com/ --recursive --cache-control no-cache --acl public-read
needs:
- build-package
only:
refs:
- staging