From 69bc604da1402863b2a20d92095d2d9594a07e2d Mon Sep 17 00:00:00 2001 From: Hein Dauven Date: Tue, 3 Nov 2026 23:14:21 +0100 Subject: [PATCH] ci: deploy to devnet from main too --- .github/workflows/deploy.yml | 13 ++++++++----- README.md | 4 ++-- wrangler.jsonc | 6 ++++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0d27c5b..632491e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,7 +1,7 @@ name: Deploy -# main goes to testnet, a release tag to mainnet. Anything to deploy has passed -# CI on its pull request. +# main goes to testnet and devnet, a release tag to mainnet. Anything to deploy +# has passed CI on its pull request. on: push: branches: [main] @@ -16,7 +16,7 @@ concurrency: jobs: deploy: - name: Deploy to ${{ github.ref_type == 'tag' && 'mainnet' || 'testnet' }} + name: Deploy to ${{ github.ref_type == 'tag' && 'mainnet' || 'testnet and devnet' }} # GitHub-hosted, for a clean machine around the Cloudflare token. runs-on: ubuntu-latest # The token is this environment's, which only main and release tags can use. @@ -55,8 +55,11 @@ jobs: VITE_FEATURE_BLOB_HASHES: "true" - name: Deploying to Cloudflare - run: deploy/node_modules/.bin/wrangler deploy --env "$NETWORK" + run: | + for network in $NETWORKS; do + deploy/node_modules/.bin/wrangler deploy --env "$network" + done env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - NETWORK: ${{ github.ref_type == 'tag' && 'mainnet' || 'testnet' }} + NETWORKS: ${{ github.ref_type == 'tag' && 'mainnet' || 'testnet devnet' }} WRANGLER_SEND_METRICS: "false" diff --git a/README.md b/README.md index 27e96cb..feaab60 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,6 @@ The application will determine which network it is connected to by the subdomain ## Deploying -The explorer runs on Cloudflare (`wrangler.jsonc`), at `explorer.dusk.network` and `explorer.testnet.dusk.network`. It picks its node by hostname, so one build serves both. +The explorer runs on Cloudflare (`wrangler.jsonc`), at `explorer.dusk.network`, `explorer.testnet.dusk.network` and `explorer.devnet.dusk.network`. It picks its node by hostname, so one build serves them all. -The Deploy workflow does it: every merge to `main` goes to testnet, and an `explorer-v*` tag goes to mainnet. Its Cloudflare token is a secret of the `cloudflare` environment, which only `main` and those tags can use. +The Deploy workflow does it: every merge to `main` goes to testnet and devnet, and an `explorer-v*` tag goes to mainnet. Its Cloudflare token is a secret of the `cloudflare` environment, which only `main` and those tags can use. diff --git a/wrangler.jsonc b/wrangler.jsonc index 08df82c..9a2532e 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -8,6 +8,12 @@ "not_found_handling": "404-page", }, "env": { + "devnet": { + "name": "explorer-devnet", + "routes": [ + { "pattern": "explorer.devnet.dusk.network", "custom_domain": true }, + ], + }, "testnet": { "name": "explorer-testnet", "routes": [