Skip to content

Commit 69df8b5

Browse files
committed
github garbage.
1 parent 31d277d commit 69df8b5

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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

browser/src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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);

browser/vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import tailwindcss from '@tailwindcss/vite'
44

55
export default defineConfig({
66
plugins: [solidPlugin(), tailwindcss()],
7+
base: process.env.NODE_ENV === 'production' ? '/registry-of-kinds/' : '/',
78
server: {
89
port: 3000,
910
},

0 commit comments

Comments
 (0)