-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (96 loc) · 4.09 KB
/
testnet.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: DEX deployment to the testing env
on:
push:
branches:
- testnet
jobs:
deploy:
env:
## Public
APP_BASE_URL: https://testnet.picasso.exchange
APP_NETWORK: staking
APP_ENV: testnet
APP_CHAIN_ID: 42
SOURCE_DIR: dist
DEST_DIR: www
## Flags
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MAINTENANCE_ENABLED: true
METRICS_ENABLED: false
GEO_IP_RESTRICTIONS_ENABLED: false
## Secret
APP_FEE_RECIPIENT: ${{ secrets.APP_FEE_RECIPIENT }}
APP_BUGSNAG_KEY: ${{ secrets.APP_BUGSNAG_KEY }}
APP_ALCHEMY_KEY: ${{ secrets.APP_ALCHEMY_KEY }}
APP_ALCHEMY_KOVAN_KEY: ${{ secrets.APP_ALCHEMY_KOVAN_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_TESTNET_BUCKET }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_TESTNET_DISTRIBUTION_ID }}
AWS_REGION: ${{ secrets.AWS_TESTNET_REGION }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Using Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install Dependencies
run: yarn install
- name: Building the project
run: yarn build
- name: Generating the static pages
run: yarn generate
- name: Use AWS CLI
uses: chrislennon/action-aws-cli@v1.1
- name: Sync to S3 bucket
run: aws s3 sync dist/ s3://$AWS_S3_BUCKET/www --follow-symlinks --delete --exclude 'static/chart/*'
- name: Set Cache Headers
run: aws s3 cp s3://$AWS_S3_BUCKET/www s3://$AWS_S3_BUCKET/www --exclude "*" --include "*.js" --include "*.css" --include "*.svg" --include "*.woff2" --include "*.woff" --include "*.ttf" --recursive --metadata-directive REPLACE --expires 2034-01-01T00:00:00Z --cache-control max-age=2592000,public
- name: Invalidate Cloudfront CDN
run: aws cloudfront create-invalidation --distribution-id=$CLOUDFRONT_DISTRIBUTION_ID --paths "/*"
deploy-stag:
env:
## Public
APP_BASE_URL: https://staging-testnet.picasso.exchange
APP_NETWORK: staking
APP_ENV: staging
APP_CHAIN_ID: 42
SOURCE_DIR: dist
DEST_DIR: www
## Flags
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MAINTENANCE_ENABLED: false
METRICS_ENABLED: false
GEO_IP_RESTRICTIONS_ENABLED: false
## Secret
APP_FEE_RECIPIENT: ${{ secrets.APP_FEE_RECIPIENT }}
APP_BUGSNAG_KEY: ${{ secrets.APP_BUGSNAG_KEY }}
APP_ALCHEMY_KEY: ${{ secrets.APP_ALCHEMY_KEY }}
APP_ALCHEMY_KOVAN_KEY: ${{ secrets.APP_ALCHEMY_KOVAN_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_STAGING_TESTNET_BUCKET }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_STAGING_TESTNET_DISTRIBUTION_ID }}
AWS_REGION: ${{ secrets.AWS_STAGING_REGION }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Using Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install Dependencies
run: yarn install
- name: Building the project
run: yarn build
- name: Generating the static pages
run: yarn generate
- name: Use AWS CLI
uses: chrislennon/action-aws-cli@v1.1
- name: Sync to S3 bucket
run: aws s3 sync dist/ s3://$AWS_S3_BUCKET/www --follow-symlinks --delete --exclude 'static/chart/*'
- name: Set Cache Headers
run: aws s3 cp s3://$AWS_S3_BUCKET/www s3://$AWS_S3_BUCKET/www --exclude "*" --include "*.js" --include "*.css" --include "*.svg" --include "*.woff2" --include "*.woff" --include "*.ttf" --recursive --metadata-directive REPLACE --expires 2034-01-01T00:00:00Z --cache-control max-age=2592000,public
- name: Invalidate Cloudfront CDN
run: aws cloudfront create-invalidation --distribution-id=$CLOUDFRONT_DISTRIBUTION_ID --paths "/*"