-
Notifications
You must be signed in to change notification settings - Fork 2
159 lines (137 loc) · 6.86 KB
/
tinlake-ui-pull-request.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: 'tinlake-ui Pull Request'
on:
pull_request:
paths:
- 'tinlake-ui/**'
- '.github/workflows/tinlake-ui-pull-request.yml'
jobs:
build-and-deploy-to-goerli:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tinlake-ui
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '12'
- name: Get Yarn Cache Directory Path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Cache Yarn Dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install
- name: Cache Next.js Bundle
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/tinlake-ui/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
- name: Lint
run: yarn lint
- name: Build
run: yarn export
env:
NEXT_PUBLIC_CENTRIFUGE_CHAIN_URL: 'wss://fullnode.catalyst.cntrfg.com'
NEXT_PUBLIC_CLAIM_CFG_CONTRACT_ADDRESS: '0x297237e17F327f8e5C8dEd78b15761A7D513353b'
NEXT_PUBLIC_ENV: 'demo'
NEXT_PUBLIC_ETHERSCAN_URL: 'https://goerli.etherscan.io'
NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING: '0x5ca22a7cD0911c0b8279faEC3F3273AE94692E34,0xdA709C17ac67fA92d6cF6E92370809694fa9714a'
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
NEXT_PUBLIC_IPFS_GATEWAY: 'https://cloudflare-ipfs.com/ipfs/'
NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS: '0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696'
NEXT_PUBLIC_ONBOARD_API_HOST: 'https://onboard-api.catalyst.cntrfg.com/'
NEXT_PUBLIC_RWA_MARKET_ONBOARD_RETURN_URL: 'https://dev.rwamarket.io'
NEXT_PUBLIC_POOL_REGISTRY: '0x46A01532De22Baa1DFDB58b5bB62845667146E5c'
NEXT_PUBLIC_POOLS_CONFIG: 'goerliStaging'
NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmdUg4VgLQg6uDBHxPjiMXoawgPM3LpBzuZr3ejCQTkuet'
NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f'
NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json'
NEXT_PUBLIC_RPC_URL: 'https://goerli.infura.io/v3/f9ba987e8cb34418bb53cdbd4d8321b5'
NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL: 'https://api.thegraph.com/subgraphs/name/offerijns/tinlake-goerli'
NEXT_PUBLIC_TRANSACTION_TIMEOUT: '3600'
- name: Deploy To Netlify
uses: nwtgck/[email protected]
with:
alias: pr-${{ github.event.pull_request.number }}
deploy-message: ${{ github.event.commit.message }}
enable-pull-request-comment: true
functions-dir: ./tinlake-ui/functions
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-config-path: ./tinlake-ui/netlify.toml
publish-dir: ./tinlake-ui/out
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.TINLAKE_UI_GOERLI_DEV_NETLIFY_SITE_ID }}
build-and-deploy-to-mainnet:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tinlake-ui
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '12'
- name: Get Yarn Cache Directory Path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Cache Yarn Dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install
- name: Cache Next.js Bundle
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/tinlake-ui/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
- name: Lint
run: yarn lint
- name: Build
run: yarn export
env:
NEXT_PUBLIC_CENTRIFUGE_CHAIN_URL: 'wss://fullnode.parachain.centrifuge.io'
NEXT_PUBLIC_CLAIM_CFG_CONTRACT_ADDRESS: '0x1cA3B2E7FfCAF83d9228a64e4726402B1d5CC054'
NEXT_PUBLIC_ENV: 'PROD'
NEXT_PUBLIC_ETHERSCAN_URL: 'https://etherscan.io'
NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING: '0x4B6CA198d257D755A5275648D471FE09931b764A,0xdB3bC9fB1893222d266762e9fF857EB74D75c7D6,0xfc2950dD337ca8496C18dfc0256Fb905A7E7E5c6,0x53b2d22d07E069a3b132BfeaaD275b10273d381E,0x0CED6166873038Ac0cc688e7E6d19E2cBE251Bf0,0x4cA805cE8EcE2E63FfC1F9f8F2731D3F48DF89Df,0x82B8617A16e388256617FeBBa1826093401a3fE5,0x560Ac248ce28972083B718778EEb0dbC2DE55740,0x3d167bd08f762FD391694c67B5e6aF0868c45538,0x3B03863BD553C4CE07eABF2278016533451c9101,0x09e43329552c9D81cF205Fd5f44796fBC40c822e,0xF96F18F2c70b57Ec864cC0C8b828450b82Ff63e3,0xd8486C565098360A24f858088a6D29a380dDF7ec'
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
NEXT_PUBLIC_IPFS_GATEWAY: 'https://cloudflare-ipfs.com/ipfs/'
NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441'
NEXT_PUBLIC_ONBOARD_API_HOST: 'https://onboard-api.catalyst.cntrfg.com/'
NEXT_PUBLIC_RWA_MARKET_ONBOARD_RETURN_URL: 'https://rwamarket.io'
NEXT_PUBLIC_POOL_REGISTRY: '0xddf1c516cf87126c6c610b52fd8d609e67fb6033'
NEXT_PUBLIC_POOLS_CONFIG: 'mainnetProduction'
NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmfShrE7bvcjiyiBjyyzfJz6dFtZ8RLdoHHA9bG1GFZzby'
NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f'
NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json'
NEXT_PUBLIC_RPC_URL: 'https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516'
NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL: 'https://graph.centrifuge.io/tinlake'
NEXT_PUBLIC_TRANSACTION_TIMEOUT: '3600'
- name: Deploy To Netlify
uses: nwtgck/[email protected]
with:
alias: pr-${{ github.event.pull_request.number }}
deploy-message: ${{ github.event.commit.message }}
enable-pull-request-comment: true
functions-dir: ./tinlake-ui/functions
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-config-path: ./tinlake-ui/netlify.toml
publish-dir: ./tinlake-ui/out
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.TINLAKE_UI_MAINNET_DEV_NETLIFY_SITE_ID }}