From 7b504bba189352d54bb631858cdc83598b489d5e Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Tue, 31 Mar 2026 12:28:00 +0100 Subject: [PATCH] Explorer Actions Signed-off-by: Nicholas Gates --- .github/workflows/web.yml | 53 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index f84ecb396fd..589c2dec133 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -36,8 +36,8 @@ jobs: - "vortex-web/**" - ".github/workflows/web.yml" - build: - name: Build & Check + check: + name: Check & Lint needs: [changes] if: needs.changes.outputs.web == 'true' runs-on: ubuntu-latest @@ -62,3 +62,52 @@ jobs: - run: npm run lint - run: npm run typecheck - run: npm run build-storybook + + build: + name: Build + needs: [changes] + if: needs.changes.outputs.web == 'true' + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v6 + - uses: ./.github/actions/setup-rust + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + enable-sccache: "false" + - name: Install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + working-directory: . + - uses: actions/setup-node@v4 + with: + node-version: "22" + cache: "npm" + cache-dependency-path: vortex-web/package-lock.json + - run: npm ci + - run: npm run build + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: vortex-explorer + path: vortex-web/dist/ + + deploy: + name: Deploy to Cloudflare Pages + needs: [build] + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + deployments: write + environment: + name: github-pages + steps: + - uses: actions/download-artifact@v4 + with: + name: vortex-explorer + path: dist + - name: Deploy to Cloudflare Pages + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: pages deploy dist/ --project-name=vortex-explorer --branch=${{ github.head_ref || github.ref_name }}