-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (46 loc) · 1.43 KB
/
deploy-ic.yml
File metadata and controls
56 lines (46 loc) · 1.43 KB
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
name: Deploy to Internet Computer
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ic-deploy
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
checks:
uses: ./.github/workflows/_checks.yml
permissions:
contents: read
pull-requests: write
deploy:
needs: checks
runs-on: ubuntu-latest
environment: IC mainnet
permissions:
contents: read
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
- name: Install icp-cli
run: npm i -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
- name: Import deploy identity
run: |
mkdir -p ~/.local/share/icp-cli/identity/keys
echo $ICP_IDENTITY | base64 -d > ~/.local/share/icp-cli/identity/keys/deployer.pem
sed -i 's/\\r\\n/\r\n/g' ~/.local/share/icp-cli/identity/keys/deployer.pem
icp identity import deployer --from-pem ~/.local/share/icp-cli/identity/keys/deployer.pem --storage plaintext
icp identity default deployer
env:
ICP_IDENTITY: ${{ secrets.DFX_IDENTITY_DESIGN_TEAM }}
- name: Deploy to IC mainnet
run: icp deploy -e ic frontend