-
Notifications
You must be signed in to change notification settings - Fork 55
59 lines (52 loc) · 2.31 KB
/
deploy-main.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
name: Deploy Production
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
name: Deploy
steps:
- uses: actions/checkout@v2
- name: Cache node_modules
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependecies
run: yarn install --frozen-lockfile
# set 'steps.vars.outputs.sha_short' variable that is used in 'Build site' step
- name: Set short sha output
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.event.pull_request.head.sha }})"
- name: Build site
env:
PUBLIC_URL: ${{ secrets.PUBLIC_URL }}
REACT_APP_BASENAME: ${{ secrets.REACT_APP_BASENAME }}
REACT_APP_CRYPTO_COMPARE_API_KEY: ${{ secrets.REACT_APP_CRYPTO_COMPARE_API_KEY }}
REACT_APP_FEE_RELAYER_URL: ${{ secrets.REACT_APP_FEE_RELAYER_URL }}
REACT_APP_AMPLITUDE_API_KEY: ${{ secrets.REACT_APP_AMPLITUDE_API_KEY }}
REACT_APP_INTERCOM_APP_ID: ${{ secrets.REACT_APP_INTERCOM_APP_ID }}
REACT_APP_MOONPAY_API_KEY: ${{ secrets.REACT_APP_MOONPAY_API_KEY }}
REACT_APP_MOONPAY_SIGNER_URL: ${{ secrets.REACT_APP_MOONPAY_SIGNER_URL }}
REACT_APP_ORCA_CACHE_URL: ${{ secrets.REACT_APP_ORCA_CACHE_URL }}
REACT_APP_SENTRY_DSN_ENDPOINT: ${{ secrets.REACT_APP_SENTRY_DSN_ENDPOINT }}
REACT_APP_SENTRY_MODE: production
REACT_APP_SENTRY_TRACES_SAMPLE_RATE: 1
REACT_APP_SENTRY_RELEASE: p2p-wallet-web_production_${{ steps.vars.outputs.sha_short }}
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }}
REACT_APP_RPCPOOL_API_KEY: ${{ secrets.REACT_APP_RPCPOOL_API_KEY }}
REACT_APP_NAME_SERVICE_URL: ${{ secrets.REACT_APP_NAME_SERVICE_URL }}
run: yarn build
- name: Publish
uses: cloudflare/wrangler-action@1.3.0
env:
USER: root # https://github.com/cloudflare/wrangler-action/issues/12#issuecomment-588226602
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
environment: 'production'