-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdeploy.sh
56 lines (45 loc) · 2.19 KB
/
deploy.sh
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
53
54
55
56
#!/bin/bash
./build.sh $1
# upload to cloudfront
if [[ $1 == "prod" ]]; then
#aws s3 cp ./deploy/ s3://static.iobio.io/vue.gene.iobio.io/ --recursive
#aws cloudfront create-invalidation --distribution-id EPK0TTL11YUW --paths /
echo "** Uploaded to prod s3 bucket **"
aws s3 cp ./deploy/ s3://static.iobio.io/prod/gene.iobio.io/ --recursive
echo "** Renew cloudfrount cache **"
aws cloudfront create-invalidation --distribution-id E331YTF25OIVP7 --paths /\*
# upload to cloudfront
elif [[ $1 == "stage" ]]; then
#aws s3 cp ./deploy/ s3://static.iobio.io/vue.gene.iobio.io/ --recursive
#aws cloudfront create-invalidation --distribution-id EPK0TTL11YUW --paths /
echo "** Uploaded to stage s3 bucket **"
aws s3 cp ./deploy/ s3://static.iobio.io/stage/gene.iobio.io/ --recursive
echo "** Renew cloudfrount cache **"
aws cloudfront create-invalidation --distribution-id E1XZ0L3S5I92GN --paths /\*
# upload to cloudfront
elif [[ $1 == "stage.mygene2" ]]; then
echo "** Uploaded to stage.mygene2 s3 bucket **"
aws s3 cp ./deploy/ s3://static.iobio.io/stage/mygene2.iobio.io/ --recursive
echo "** Renew cloudfrount cache **"
aws cloudfront create-invalidation --distribution-id E2XR0DTGGE2U2U --paths /\*
# upload to cloudfront
elif [[ $1 == "stage.nebula" ]]; then
echo "** Uploaded to stage.nebula s3 bucket **"
aws s3 cp ./deploy/ s3://static.iobio.io/stage/nebulagene.iobio.io/ --recursive
echo "** Renew cloudfrount cache **"
aws cloudfront create-invalidation --distribution-id E1F15HR71LD7NY --paths /\*
# upload to cloudfront
elif [[ $1 == "learngene" ]]; then
echo "** Uploaded to exhibit version of gene.iobio to s3 bucket **"
aws s3 cp ./deploy/ s3://learngene.iobio.io/ --recursive
echo "** Renew cloudfrount cache **"
aws cloudfront create-invalidation --distribution-id E2DN3QDWY6RYL1 --paths /\*
echo "** defaulting to original .env"
cp .env.template .env
else
echo "** Syncing to dev s3 bucket **"
#aws s3 sync ./deploy/ s3://static.iobio.io/dev/gene.iobio.io/
aws s3 cp ./deploy/ s3://static.iobio.io/dev/gene.iobio.io/ --recursive
echo "** Renew cloudfrount cache **"
aws cloudfront create-invalidation --distribution-id E1RAE4AL1ULL9A --paths /\*
fi