forked from aragon/client
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (63 loc) · 2.23 KB
/
deploy.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
name: Client Production CI/CD
on:
push:
branches:
- 'master'
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build Aragon
run: yarn build
- name: Run BundleWatch
run: yarn bundlewatch
- name: Run tests
run: yarn test
env:
CI: true
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
build-deploy:
runs-on: ubuntu-latest
needs: tests
container: fleek/create-react-app:node-14
environment: production
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install build dependencies
run: apt-get update && apt-get install -y build-essential git libusb-1.0-0 libusb-1.0-0-dev libudev-dev
- name: Build the client
env:
REACT_APP_DEPLOY_VERSION: ${{ github.sha }}
REACT_APP_DEPLOY_ENVIRONMENT: production
REACT_APP_ANALYTICS_KEY: ${{ secrets.REACT_APP_ANALYTICS_KEY }}
ARAGON_ETH_SUBSCRIPTION_EVENT_DELAY: 5000
ARAGON_FORTMATIC_API_KEY: ${{ secrets.FORMATIC_API_KEY }}
ARAGON_PORTIS_DAPP_ID: ${{ secrets.PORTIS_DAPP_ID }}
# TODO remove --network-concurrency 1 once use-wallet 0.9.0 is published
run: yarn install --frozen-lockfile --network-concurrency 1 && yarn build
- name: Deploy fleek
id: deploy
uses: fleekhq/action-deploy@v1
with:
apiKey: ${{ secrets.FLEEK_API_KEY }}
- name: Get the output url
run: echo "Deploy url is ${{ steps.deploy.outputs.deployUrl }}"
- name: upload sourcemap to apm
env:
COMMIT_SHA: ${{ github.sha }}
run: |
for f in $(find ./public/ -name "*.js.map") ; do
export filename=${f%.*}
curl -X POST https://apm-monitoring.aragon.org/assets/v1/sourcemaps -F service_name="client" -F service_version="$COMMIT_SHA" -F bundle_filepath="http://localhost/${filename#./public/}" -F sourcemap=@$f
done