diff --git a/DEPLOY_DOC.md b/DEPLOY_DOC.md index e5cf746..28bc462 100644 --- a/DEPLOY_DOC.md +++ b/DEPLOY_DOC.md @@ -118,11 +118,11 @@ Then just validate `cdm.json` contains resolved contract metadata and addresses. ## 7. Deploy Frontend -Pending W3S environment support in `bulletin-deploy`. Once `bulletin-deploy --list-environments` includes the W3S/Summit environment, a CDM maintainer can redeploy `contracts.dot`: +The frontend is deployed with [`polkadot-app-deploy`](https://github.com/paritytech/polkadot-app-deploy) (npm: `@parity/polkadot-app-deploy`, the successor of `bulletin-deploy`), which ships the W3S/Summit environment as `summit`. Confirm it appears in `polkadot-app-deploy --list-environments`, then a CDM maintainer can redeploy `contracts.dot`: ```bash cd ../contract-dependency-manager -BULLETIN_DEPLOY_ENV=w3s src/lib/scripts/deploy-frontend.sh "$CDM_DEPLOY_SURI" +APP_DEPLOY_ENV=summit src/lib/scripts/deploy-frontend.sh "$CDM_DEPLOY_SURI" ``` ## Verify diff --git a/src/lib/scripts/deploy-frontend.sh b/src/lib/scripts/deploy-frontend.sh index 889b353..f82059b 100755 --- a/src/lib/scripts/deploy-frontend.sh +++ b/src/lib/scripts/deploy-frontend.sh @@ -3,17 +3,18 @@ set -euo pipefail usage() { cat <<'EOF' -Usage: src/lib/scripts/deploy-frontend.sh [bulletin-deploy args...] +Usage: src/lib/scripts/deploy-frontend.sh [polkadot-app-deploy args...] -Builds the CDM frontend and deploys it to contracts.dot with bulletin-deploy. +Builds the CDM frontend and deploys it to contracts.dot with polkadot-app-deploy. Examples: - src/lib/scripts/deploy-frontend.sh '//Alice' + src/lib/scripts/deploy-frontend.sh "$CDM_DEPLOY_SURI" src/lib/scripts/deploy-frontend.sh "$CDM_DEPLOY_SURI" --tag frontend Environment: - BULLETIN_DEPLOY_ENV Target bulletin-deploy env. Default: paseo-next-v2 - SKIP_BULLETIN_INSTALL Set to 1 to skip npm install -g bulletin-deploy@latest + APP_DEPLOY_ENV Target polkadot-app-deploy env. Default: paseo-next-v2 + Run `polkadot-app-deploy --list-environments` for valid ids. + SKIP_APP_DEPLOY_INSTALL Set to 1 to skip npm install -g @parity/polkadot-app-deploy EOF } @@ -22,28 +23,28 @@ if [[ $# -lt 1 || "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then exit 1 fi -SURI="$1" +MNEMONIC="$1" shift SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" ROOT="$(cd -- "$SCRIPT_DIR/../../.." && pwd)" FRONTEND_DIST="$ROOT/src/apps/frontend/dist" DOMAIN="contracts.dot" -ENV_ID="${BULLETIN_DEPLOY_ENV:-paseo-next-v2}" +ENV_ID="${APP_DEPLOY_ENV:-paseo-next-v2}" cd "$ROOT" -if [[ "${SKIP_BULLETIN_INSTALL:-0}" != "1" ]]; then - npm install -g bulletin-deploy@latest +if [[ "${SKIP_APP_DEPLOY_INSTALL:-0}" != "1" ]]; then + npm install -g @parity/polkadot-app-deploy@latest fi pnpm turbo build --filter=@parity/cdm-frontend export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--max-old-space-size=8192" -bulletin-deploy \ +polkadot-app-deploy \ --env "$ENV_ID" \ - --suri "$SURI" \ + --mnemonic "$MNEMONIC" \ "$FRONTEND_DIST" \ "$DOMAIN" \ "$@"