Skip to content

Commit 4d079bd

Browse files
Copilotrajbos
andcommitted
Fix GitHub Actions build error by using main-github-pages.tsx and updating dependencies
Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
1 parent 10b84e8 commit 4d079bd

1 file changed

Lines changed: 67 additions & 17 deletions

File tree

.github/workflows/deploy-to-pages.yml

Lines changed: 67 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ jobs:
3838
cat > vite.config.js << 'EOF'
3939
import { defineConfig } from "vite";
4040
import react from "@vitejs/plugin-react";
41+
import tailwindcss from "@tailwindcss/vite";
4142
import { resolve } from 'path';
4243
4344
// https://vitejs.dev/config/
4445
export default defineConfig({
45-
plugins: [react()],
46+
plugins: [react(), tailwindcss()],
4647
build: {
47-
base: "/spark-template/",
48+
base: "/github-copilot-usage/",
4849
outDir: 'dist'
4950
},
5051
resolve: {
@@ -68,23 +69,67 @@ jobs:
6869
"preview": "vite preview"
6970
},
7071
"dependencies": {
71-
"@phosphor-icons/react": "^2.0.15",
72-
"clsx": "^2.1.0",
73-
"react": "^18.2.0",
74-
"react-dom": "^18.2.0",
75-
"recharts": "^2.10.3",
76-
"sonner": "^1.2.4",
77-
"tailwind-merge": "^2.2.0"
72+
"@heroicons/react": "^2.2.0",
73+
"@phosphor-icons/react": "^2.1.7",
74+
"@radix-ui/colors": "^3.0.0",
75+
"@radix-ui/react-accordion": "^1.2.3",
76+
"@radix-ui/react-alert-dialog": "^1.1.6",
77+
"@radix-ui/react-aspect-ratio": "^1.1.2",
78+
"@radix-ui/react-avatar": "^1.1.3",
79+
"@radix-ui/react-checkbox": "^1.1.4",
80+
"@radix-ui/react-collapsible": "^1.1.3",
81+
"@radix-ui/react-context-menu": "^2.2.6",
82+
"@radix-ui/react-dialog": "^1.1.6",
83+
"@radix-ui/react-dropdown-menu": "^2.1.6",
84+
"@radix-ui/react-hover-card": "^1.1.6",
85+
"@radix-ui/react-label": "^2.1.2",
86+
"@radix-ui/react-menubar": "^1.1.6",
87+
"@radix-ui/react-navigation-menu": "^1.2.5",
88+
"@radix-ui/react-popover": "^1.1.6",
89+
"@radix-ui/react-progress": "^1.1.2",
90+
"@radix-ui/react-radio-group": "^1.2.3",
91+
"@radix-ui/react-scroll-area": "^1.2.9",
92+
"@radix-ui/react-select": "^2.1.6",
93+
"@radix-ui/react-separator": "^1.1.2",
94+
"@radix-ui/react-slider": "^1.2.3",
95+
"@radix-ui/react-slot": "^1.1.2",
96+
"@radix-ui/react-switch": "^1.1.3",
97+
"@radix-ui/react-tabs": "^1.1.3",
98+
"@radix-ui/react-toggle": "^1.1.2",
99+
"@radix-ui/react-toggle-group": "^1.1.2",
100+
"@radix-ui/react-tooltip": "^1.1.8",
101+
"class-variance-authority": "^0.7.1",
102+
"clsx": "^2.1.1",
103+
"cmdk": "^1.1.1",
104+
"d3": "^7.9.0",
105+
"date-fns": "^3.6.0",
106+
"embla-carousel-react": "^8.5.2",
107+
"framer-motion": "^12.6.2",
108+
"input-otp": "^1.4.2",
109+
"lucide-react": "^0.484.0",
110+
"marked": "^15.0.7",
111+
"react": "^19.0.0",
112+
"react-day-picker": "^9.6.7",
113+
"react-dom": "^19.0.0",
114+
"react-hook-form": "^7.54.2",
115+
"react-resizable-panels": "^2.1.7",
116+
"recharts": "^2.15.1",
117+
"sonner": "^2.0.1",
118+
"tailwind-merge": "^3.0.2",
119+
"three": "^0.175.0",
120+
"tw-animate-css": "^1.2.4",
121+
"uuid": "^11.1.0",
122+
"vaul": "^1.1.2",
123+
"zod": "^3.24.2"
78124
},
79125
"devDependencies": {
80-
"@types/react": "^18.2.46",
81-
"@types/react-dom": "^18.2.18",
82-
"@vitejs/plugin-react": "^4.2.1",
83-
"autoprefixer": "^10.4.16",
84-
"postcss": "^8.4.32",
85-
"tailwindcss": "^3.4.0",
86-
"typescript": "^5.3.3",
87-
"vite": "^5.0.10"
126+
"@tailwindcss/vite": "^4.0.17",
127+
"@types/react": "^19.0.10",
128+
"@types/react-dom": "^19.0.4",
129+
"@vitejs/plugin-react": "^4.3.4",
130+
"tailwindcss": "^4.0.17",
131+
"typescript": "~5.7.2",
132+
"vite": "^6.3.5"
88133
}
89134
}
90135
EOF
@@ -130,6 +175,11 @@ jobs:
130175
# Replace imports from @github/spark/hooks with our shim
131176
find src -type f -name "*.ts" -o -name "*.tsx" | xargs sed -i 's/import {.*} from "@github\/spark\/hooks"/import { useKV } from "..\/spark-shims\/hooks"/g'
132177
178+
- name: Use GitHub Pages main file
179+
run: |
180+
# Use the main-github-pages.tsx instead of main.tsx to avoid Spark imports
181+
cp src/main-github-pages.tsx src/main.tsx
182+
133183
- name: Setup Pages
134184
uses: actions/configure-pages@v4
135185

0 commit comments

Comments
 (0)