-
Notifications
You must be signed in to change notification settings - Fork 17
46 lines (42 loc) · 1.35 KB
/
deploy-production.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
name: Deploy to Production
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Prepare
run: |
# Install dfx.
wget --output-document install-dfx.sh "https://raw.githubusercontent.com/dfinity/sdk/master/public/install-dfxvm.sh"
DFX_VERSION=${DFX_VERSION:=0.14.3} DFXVM_INIT_YES=true bash install-dfx.sh
rm install-dfx.sh
echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH
source "$HOME/.local/share/dfx/env"
dfx cache install
# Prepare identity.
echo "${{secrets.WEIHAILU}}" > identity.pem
chmod 400 identity.pem
mkdir -p ~/.config/dfx/identity/default
mv identity.pem ~/.config/dfx/identity/default/identity.pem
dfx identity list
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Build
run: |
cd docusaurus
npm install
npm run build
cd ..
- name: Deploy
run: |
rm canister_ids.json
echo '{ "ic123_frontend": { "ic": "${{ vars.PRODUCTION_CANISTER_ID }}" } }' > canister_ids.json
dfx start --background --clean
dfx deploy --network=ic
- name: Summarize
run: echo 'https://${{ vars.PRODUCTION_CANISTER_ID }}.icp0.io' >> $GITHUB_STEP_SUMMARY