-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (60 loc) · 1.82 KB
/
webclient-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
64
65
66
67
68
69
70
71
name: wc:deploy
on:
push:
branches:
- main
paths:
- "packages/web-client/**"
- ".github/workflows/webclient-deploy.yml"
- "wc.prod.fly.toml"
- "wc.Dockerfile"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ic-production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install dependencies
shell: bash
run: npm install
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: "0.13.1"
- name: Confirm successful installation
run: dfx --version
- run: npm run wc:build:static:prod # Build without sentry
- name: Setup env to deploy
run: |
touch actions_identity.pem
echo "${{ secrets.CANISTER_CONTROLLER_SECRET_KEY }}" > actions_identity.pem
dfx identity import --disable-encryption actions actions_identity.pem
rm actions_identity.pem
dfx identity use actions
- run: dfx deploy webclient --network ic --no-wallet -y
fly-production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- run: npm install
- name: Touch .env
shell: bash
working-directory: "packages/web-client/"
run: |
touch .env
echo "SENTRY_AUTH_TOKEN=\"${{ secrets.SENTRY_AUTH_TOKEN }}\"" >> .env
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy production build
run: flyctl deploy --config ./wc.prod.fly.toml
env:
FLY_API_TOKEN: ${{ secrets.FLYIO_KIT_DEPLOY_GH_ACTION }}