This repository has been archived by the owner on Dec 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (46 loc) · 1.78 KB
/
.travis.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
49
50
51
52
branches:
only:
# Tagged releases
- /^[0-9]{4}\.[0-9]{2}\.[0-9]{2}\.[0-9]+$/
# Master
- master
# Release branches
- /^release\/.+$/
# Develop
- develop
language: node_js
node_js:
- 16
cache: yarn
install:
- yarn install
script:
- echo "No tests ran"
before_deploy:
- rm -Rf ${PWD}/aws
- curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
- unzip awscliv2.zip
- sudo ./aws/install
- export PATH=$PATH:/usr/local/bin
- aws --version
deploy:
# Tagged releases
- provider: script
script: ENVIRONMENT=production AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_PRODUCTION AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_PRODUCTION AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION_PRODUCTION S3_BUCKET_NAME=$S3_BUCKET_NAME_PRODUCTION DISTRIBUTION_ID=$DISTRIBUTION_ID_PRODUCTION bash .travis/deploy.sh
skip_cleanup: true
on:
all_branches: true
condition: ${TRAVIS_TAG} =~ ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}\.[0-9]+$
# Release branches
- provider: script
script: ENVIRONMENT=release AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_RELEASE AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_RELEASE AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION_RELEASE S3_BUCKET_NAME=$S3_BUCKET_NAME_RELEASE DISTRIBUTION_ID=$DISTRIBUTION_ID_RELEASE bash .travis/deploy.sh
skip_cleanup: true
on:
all_branches: true
condition: ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} =~ ^release\/.+$
# Develop
- provider: script
script: ENVIRONMENT=staging AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_STAGING AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_STAGING AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION_STAGING S3_BUCKET_NAME=$S3_BUCKET_NAME_STAGING DISTRIBUTION_ID=$DISTRIBUTION_ID_STAGING bash .travis/deploy.sh
skip_cleanup: true
on:
branch: develop