Skip to content

Commit 49ccf57

Browse files
authored
Merge pull request #7 from rajbos/copilot/fix-6
Fix GitHub Actions build error by using main-github-pages.tsx and updating dependencies
2 parents 70fb6c6 + 00006fa commit 49ccf57

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
@@ -40,13 +40,14 @@ jobs:
4040
cat > vite.config.js << 'EOF'
4141
import { defineConfig } from "vite";
4242
import react from "@vitejs/plugin-react";
43+
import tailwindcss from "@tailwindcss/vite";
4344
import { resolve } from 'path';
4445
4546
// https://vitejs.dev/config/
4647
export default defineConfig({
47-
plugins: [react()],
48+
plugins: [react(), tailwindcss()],
4849
build: {
49-
base: "/spark-template/",
50+
base: "/github-copilot-usage/",
5051
outDir: 'dist'
5152
},
5253
resolve: {
@@ -70,23 +71,67 @@ jobs:
7071
"preview": "vite preview"
7172
},
7273
"dependencies": {
73-
"@phosphor-icons/react": "^2.0.15",
74-
"clsx": "^2.1.0",
75-
"react": "^18.2.0",
76-
"react-dom": "^18.2.0",
77-
"recharts": "^2.10.3",
78-
"sonner": "^1.2.4",
79-
"tailwind-merge": "^2.2.0"
74+
"@heroicons/react": "^2.2.0",
75+
"@phosphor-icons/react": "^2.1.7",
76+
"@radix-ui/colors": "^3.0.0",
77+
"@radix-ui/react-accordion": "^1.2.3",
78+
"@radix-ui/react-alert-dialog": "^1.1.6",
79+
"@radix-ui/react-aspect-ratio": "^1.1.2",
80+
"@radix-ui/react-avatar": "^1.1.3",
81+
"@radix-ui/react-checkbox": "^1.1.4",
82+
"@radix-ui/react-collapsible": "^1.1.3",
83+
"@radix-ui/react-context-menu": "^2.2.6",
84+
"@radix-ui/react-dialog": "^1.1.6",
85+
"@radix-ui/react-dropdown-menu": "^2.1.6",
86+
"@radix-ui/react-hover-card": "^1.1.6",
87+
"@radix-ui/react-label": "^2.1.2",
88+
"@radix-ui/react-menubar": "^1.1.6",
89+
"@radix-ui/react-navigation-menu": "^1.2.5",
90+
"@radix-ui/react-popover": "^1.1.6",
91+
"@radix-ui/react-progress": "^1.1.2",
92+
"@radix-ui/react-radio-group": "^1.2.3",
93+
"@radix-ui/react-scroll-area": "^1.2.9",
94+
"@radix-ui/react-select": "^2.1.6",
95+
"@radix-ui/react-separator": "^1.1.2",
96+
"@radix-ui/react-slider": "^1.2.3",
97+
"@radix-ui/react-slot": "^1.1.2",
98+
"@radix-ui/react-switch": "^1.1.3",
99+
"@radix-ui/react-tabs": "^1.1.3",
100+
"@radix-ui/react-toggle": "^1.1.2",
101+
"@radix-ui/react-toggle-group": "^1.1.2",
102+
"@radix-ui/react-tooltip": "^1.1.8",
103+
"class-variance-authority": "^0.7.1",
104+
"clsx": "^2.1.1",
105+
"cmdk": "^1.1.1",
106+
"d3": "^7.9.0",
107+
"date-fns": "^3.6.0",
108+
"embla-carousel-react": "^8.5.2",
109+
"framer-motion": "^12.6.2",
110+
"input-otp": "^1.4.2",
111+
"lucide-react": "^0.484.0",
112+
"marked": "^15.0.7",
113+
"react": "^19.0.0",
114+
"react-day-picker": "^9.6.7",
115+
"react-dom": "^19.0.0",
116+
"react-hook-form": "^7.54.2",
117+
"react-resizable-panels": "^2.1.7",
118+
"recharts": "^2.15.1",
119+
"sonner": "^2.0.1",
120+
"tailwind-merge": "^3.0.2",
121+
"three": "^0.175.0",
122+
"tw-animate-css": "^1.2.4",
123+
"uuid": "^11.1.0",
124+
"vaul": "^1.1.2",
125+
"zod": "^3.24.2"
80126
},
81127
"devDependencies": {
82-
"@types/react": "^18.2.46",
83-
"@types/react-dom": "^18.2.18",
84-
"@vitejs/plugin-react": "^4.2.1",
85-
"autoprefixer": "^10.4.16",
86-
"postcss": "^8.4.32",
87-
"tailwindcss": "^3.4.0",
88-
"typescript": "^5.3.3",
89-
"vite": "^5.0.10"
128+
"@tailwindcss/vite": "^4.0.17",
129+
"@types/react": "^19.0.10",
130+
"@types/react-dom": "^19.0.4",
131+
"@vitejs/plugin-react": "^4.3.4",
132+
"tailwindcss": "^4.0.17",
133+
"typescript": "~5.7.2",
134+
"vite": "^6.3.5"
90135
}
91136
}
92137
EOF
@@ -132,6 +177,11 @@ jobs:
132177
# Replace imports from @github/spark/hooks with our shim
133178
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'
134179
180+
- name: Use GitHub Pages main file
181+
run: |
182+
# Use the main-github-pages.tsx instead of main.tsx to avoid Spark imports
183+
cp src/main-github-pages.tsx src/main.tsx
184+
135185
- name: Setup Pages
136186
uses: actions/configure-pages@v4
137187

0 commit comments

Comments
 (0)