-
Notifications
You must be signed in to change notification settings - Fork 16
58 lines (49 loc) · 1.82 KB
/
deploy_MainNet_UI.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
name: 2wp-app deploy UI for MainNet
on:
push:
tags:
- 'v*'
jobs:
checkout-and-build:
runs-on: ubuntu-latest
steps:
- name: Get tag name.
id: get_tag_name
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ steps.get_tag_name.outputs.VERSION }}
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build site
run: >
VUE_APP_HOTJAR_ID=${{ secrets.MAINNET_VUE_APP_CLARITY_ID }}
VUE_APP_COIN='main'
VUE_APP_MANIFEST_EMAIL='user@rsk.co'
VUE_APP_MANIFEST_APP_URL='https://app.2wp.rootstock.io'
VUE_APP_API_BASE_URL='https://api.2wp.rootstock.io'
VUE_APP_RSK_NODE_HOST='https://public-node.rsk.co'
VUE_APP_RSK_EXPLORER='https://explorer.rsk.co/'
VUE_APP_WALLET_ADDRESSES_HARD_STOP=100
VUE_APP_WALLET_ADDRESS_PER_CALL=20
VUE_APP_PEGOUT_MIN_AMOUNT_ALLOWED_IN_RBTC=0.004
VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=1
npm run-script build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.MAINNET_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.MAINNET_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy site to S3
run: |
aws s3 sync --delete --only-show-errors dist/ ${{ secrets.MAINNET_S3_BUCKET }}
- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.MAINNET_CLOUDFRONT_DISTRIBUTION }} --paths "/*"