-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 2.07 KB
/
mainnet.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
name: DEX deployment to the mainnet env
on:
push:
branches:
- mainnet
jobs:
deploy:
env:
## Public
APP_BASE_URL: https://trade.picasso.exchange
APP_NETWORK: mainnet
APP_ENV: mainnet
APP_CHAIN_ID: 1
SOURCE_DIR: dist
DEST_DIR: www
## Flags
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MAINTENANCE_ENABLED: true
METRICS_ENABLED: false
GEO_IP_RESTRICTIONS_ENABLED: true
## 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_MAINNET_BUCKET }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_MAINNET_DISTRIBUTION_ID }}
AWS_REGION: ${{ secrets.AWS_MAINNET_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 "/*"