-
-
Notifications
You must be signed in to change notification settings - Fork 251
76 lines (67 loc) · 2.63 KB
/
build-suite-web.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
name: "[Build] suite-web"
# this action is for building and deploying the web app to dev.suite.sldev.cz/suite-web/develop/web after code is pushed to develop.
permissions:
id-token: write # for fetching the OIDC token
contents: read # for actions/checkout
# run only if there are changes in suite or related libs paths
on:
push:
branches:
- develop
paths-ignore:
- "suite-native/**"
- "packages/connect*/**"
- "packages/react-native-usb/**"
# ignore unrelated github workflows config files
- ".github/workflows/connect*"
- ".github/workflows/suite-native*"
- ".github/workflows/build-desktop*"
- ".github/workflows/release*"
- ".github/workflows/template*"
env:
DEV_SERVER_URL: "https://dev.suite.sldev.cz"
jobs:
build-web:
if: github.repository == 'trezor/trezor-suite'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::538326561891:role/gh_actions_trezor_suite_dev_deploy
aws-region: eu-central-1
- name: Extract branch name
id: extract_branch
run: |
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
run: |
echo -e "\nenableScripts: false" >> .yarnrc.yml
echo -e "\nenableHardenedMode: false" >> .yarnrc.yml
yarn workspaces focus @trezor/suite-web @trezor/connect-iframe @trezor/connect-web @trezor/suite-data @trezor/suite-build
- name: Build suite-web
env:
ASSET_PREFIX: /suite-web/${{ steps.extract_branch.outputs.branch }}/web
DESKTOP_APP_NAME: "Trezor-Suite"
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
yarn message-system-sign-config
yarn workspace @trezor/suite-data build:lib
NODE_ENV=production yarn workspace @trezor/connect-iframe build:lib
yarn workspace @trezor/connect-web build
yarn workspace @trezor/suite-web build
# this step should upload build result to s3 bucket dev.suite.sldev.cz using awscli
- name: Upload suite-web to dev.suite.sldev.cz
env:
DEPLOY_PATH: s3://dev.suite.sldev.cz/suite-web/${{ steps.extract_branch.outputs.branch }}
run: |
aws s3 sync --delete ./packages/suite-web/build ${DEPLOY_PATH}/web