Skip to content

Deprecating the Bitcoin API of the management canister (#354) #111

Deprecating the Bitcoin API of the management canister (#354)

Deprecating the Bitcoin API of the management canister (#354) #111

name: Master Preview
on:
push:
branches: [ master ]
jobs:
build_and_deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install DFX
uses: dfinity/setup-dfx@main
- name: "Build & Deploy"
run: |
mkdir -p ~/.config/dfx/identity/default
echo $DFX_IDENTITY_PREVIEW | tr -d '\n\r ' | base64 -d > ~/.config/dfx/identity/default/identity.pem
sed -i 's/\\r\\n/\r\n/g' ~/.config/dfx/identity/default/identity.pem
# request preview canister from the pool
pip install ic-py
canister_id=$(python3 .github/workflows/scripts/request-canister.py master)
# this is where the root of the web pages resides
cd docusaurus
# overwrite canister id in dfx.json
echo "{\"portal\":{\"ic\":\"$canister_id\"}}" > canister_ids.json
echo "PREVIEW_CANISTER_ID=$canister_id" >> $GITHUB_ENV
# install and deploy
npm install
export PREVIEW_CANISTER_ID=$canister_id
dfx deploy --network=ic --no-wallet portal --yes
echo "Master Preview canister ID: $PREVIEW_CANISTER_ID"
env:
DFX_IDENTITY_PREVIEW: ${{ secrets.DFX_IDENTITY_PREVIEW }}
POOL_CANISTER_ID: ${{ secrets.POOL_CANISTER_ID }}