Skip to content

Commit f5ee893

Browse files
committed
fix: allow / and /jportal for gh n cf respectively
1 parent 47c1bb6 commit f5ee893

9 files changed

Lines changed: 273 additions & 169 deletions

File tree

.github/workflows/deploy-cf.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
on: [push]
1+
on:
2+
push:
3+
branches: [main]
4+
workflow_dispatch:
25

36
jobs:
47
deploy:
@@ -23,7 +26,7 @@ jobs:
2326
cache-dependency-path: jportal/package-lock.json
2427

2528
- run: npm ci
26-
- run: npm run build
29+
- run: npm run build:cf
2730

2831
- name: Deploy
2932
uses: cloudflare/wrangler-action@v3
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: github-pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
21+
defaults:
22+
run:
23+
working-directory: jportal
24+
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Setup Node
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 24
36+
cache: npm
37+
cache-dependency-path: jportal/package-lock.json
38+
39+
- run: npm ci
40+
- run: npm run build:gh
41+
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v5
44+
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: jportal/dist
49+
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

jportal/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
VITE_APP_BASE_PATH=/jportal/
12
VITE_USE_FAKE_DATA=false
23
VITE_CLOUDFLARE_API_TOKEN=g29zrxuDBV3FfsTpC3q4_sFeFgFyz-ztlDO_p-T1
34
VITE_CLOUDFLARE_PROXY_URL=https://cors-header-proxy.my-malikyash.workers.dev

0 commit comments

Comments
 (0)