File tree Expand file tree Collapse file tree 3 files changed +61
-1
lines changed Expand file tree Collapse file tree 3 files changed +61
-1
lines changed Original file line number Diff line number Diff line change 1+ name : deploy to github pages
2+
3+ on :
4+ push :
5+ branches : ["master"]
6+
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ concurrency :
15+ group : " pages"
16+ cancel-in-progress : true
17+
18+ jobs :
19+ deploy :
20+ environment :
21+ name : github-pages
22+ url : ${{ steps.deployment.outputs.page_url }}
23+ runs-on : ubuntu-latest
24+ steps :
25+ - name : checkout repository
26+ uses : actions/checkout@v4
27+
28+ - name : set up node.js
29+ uses : actions/setup-node@v4
30+ with :
31+ node-version : 20
32+
33+ - name : install dependencies
34+ run : npm install
35+ working-directory : ./browser
36+
37+ - name : delete schema.yaml symlink
38+ run : rm browser/public/schema.yaml
39+
40+ - name : copy schema.yaml to browser public folder
41+ run : cp schema.yaml browser/public/schema.yaml
42+
43+ - name : build project
44+ run : npm run build
45+ working-directory : ./browser
46+ env :
47+ NODE_ENV : production
48+
49+ - name : setup pages
50+ uses : actions/configure-pages@v4
51+
52+ - name : upload artifact
53+ uses : actions/upload-pages-artifact@v3
54+ with :
55+ path : ' ./browser/dist'
56+
57+ - name : deploy to github pages
58+ id : deployment
59+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function App() {
1212 // load schema.yaml on mount
1313 onMount ( async ( ) => {
1414 try {
15- const response = await fetch ( '/ schema.yaml' ) ;
15+ const response = await fetch ( 'schema.yaml' ) ;
1616 if ( ! response . ok ) throw new Error ( 'Failed to load schema.yaml' ) ;
1717 const text = await response . text ( ) ;
1818 const data = yaml . load ( text ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import tailwindcss from '@tailwindcss/vite'
44
55export default defineConfig ( {
66 plugins : [ solidPlugin ( ) , tailwindcss ( ) ] ,
7+ base : process . env . NODE_ENV === 'production' ? '/registry-of-kinds/' : '/' ,
78 server : {
89 port : 3000 ,
910 } ,
You can’t perform that action at this time.
0 commit comments