Skip to content

Commit 16f1a7f

Browse files
authored
Deploy Explorer (#7211)
Signed-off-by: Nicholas Gates <nick@nickgates.com>
1 parent 60aba91 commit 16f1a7f

1 file changed

Lines changed: 51 additions & 2 deletions

File tree

.github/workflows/web.yml

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
- "vortex-web/**"
3737
- ".github/workflows/web.yml"
3838
39-
build:
40-
name: Build & Check
39+
check:
40+
name: Check & Lint
4141
needs: [changes]
4242
if: needs.changes.outputs.web == 'true'
4343
runs-on: ubuntu-latest
@@ -62,3 +62,52 @@ jobs:
6262
- run: npm run lint
6363
- run: npm run typecheck
6464
- run: npm run build-storybook
65+
66+
build:
67+
name: Build
68+
needs: [changes]
69+
if: needs.changes.outputs.web == 'true'
70+
runs-on: ubuntu-latest
71+
timeout-minutes: 30
72+
steps:
73+
- uses: actions/checkout@v6
74+
- uses: ./.github/actions/setup-rust
75+
with:
76+
repo-token: ${{ secrets.GITHUB_TOKEN }}
77+
enable-sccache: "false"
78+
- name: Install wasm-pack
79+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
80+
working-directory: .
81+
- uses: actions/setup-node@v4
82+
with:
83+
node-version: "22"
84+
cache: "npm"
85+
cache-dependency-path: vortex-web/package-lock.json
86+
- run: npm ci
87+
- run: npm run build
88+
- name: Upload build artifact
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: vortex-explorer
92+
path: vortex-web/dist/
93+
94+
deploy:
95+
name: Deploy to Cloudflare Pages
96+
needs: [build]
97+
runs-on: ubuntu-latest
98+
timeout-minutes: 10
99+
permissions:
100+
deployments: write
101+
environment:
102+
name: github-pages
103+
steps:
104+
- uses: actions/download-artifact@v4
105+
with:
106+
name: vortex-explorer
107+
path: dist
108+
- name: Deploy to Cloudflare Pages
109+
uses: cloudflare/wrangler-action@v3
110+
with:
111+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
112+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
113+
command: pages deploy dist/ --project-name=vortex-explorer --branch=${{ github.head_ref || github.ref_name }}

0 commit comments

Comments
 (0)