File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Demo
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+ jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+ env :
17+ GITHUB_PAGES : true
18+ steps :
19+ - uses : actions/checkout@v4
20+ - uses : pnpm/action-setup@v2
21+ with :
22+ version : 8
23+ - uses : actions/setup-node@v4
24+ with :
25+ node-version : ' 20'
26+ cache : ' pnpm'
27+ - run : pnpm install
28+ - run : pnpm --filter @openblock/core build && pnpm --filter @openblock/react build
29+ - run : pnpm --filter @openblock/example-basic build
30+ - uses : actions/configure-pages@v4
31+ - uses : actions/upload-pages-artifact@v3
32+ with :
33+ path : ' ./examples/basic/dist'
34+
35+ deploy :
36+ environment :
37+ name : github-pages
38+ url : ${{ steps.deployment.outputs.page_url }}
39+ runs-on : ubuntu-latest
40+ needs : build
41+ steps :
42+ - uses : actions/deploy-pages@v4
43+ id : deployment
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import path from 'path';
44
55export default defineConfig ( {
66 plugins : [ react ( ) ] ,
7+ base : process . env . GITHUB_PAGES ? '/openblock/' : '/' ,
78 resolve : {
89 alias : {
910 // Resolve @openblock packages to their dist folders in the monorepo
You can’t perform that action at this time.
0 commit comments