Skip to content

Commit 97c8bcb

Browse files
committed
GitHub Actions Deployment Fix
Fix React Router Fix Snake Workflow Fix Favicon Path Remove Service Worker Registration
1 parent 6991b08 commit 97c8bcb

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

.github/workflows/snake.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
timeout-minutes: 10
1616

1717
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
1821
- name: Generate GitHub Contribution Snake
1922
uses: Platane/snk/svg-only@v3
2023
with:
@@ -26,6 +29,6 @@ jobs:
2629
- name: Push to GitHub
2730
uses: EndBug/add-and-commit@v9
2831
with:
29-
branch: output
32+
new_branch: output
3033
add: 'dist/*'
3134
message: 'Generate contribution snake'

index-react.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<meta property="og:url" content="https://thomasjbutler.me">
1616

1717
<!-- Favicon -->
18-
<link rel="icon" type="image/x-icon" href="/favicon.ico">
18+
<link rel="icon" type="image/x-icon" href="./favicon.ico">
1919

2020
<!-- Font Awesome -->
2121
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const App: React.FC = () => {
5252

5353
return (
5454
<>
55-
<Router>
55+
<Router basename="/ThomasJButler">
5656
<Routes>
5757
<Route path="/" element={<Layout />}>
5858
<Route index element={

src/main.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom/client';
33
import { App } from './App';
4-
import * as serviceWorker from './utils/serviceWorker';
4+
// import * as serviceWorker from './utils/serviceWorker';
55

66
// Initialize React app
77
const root = ReactDOM.createRoot(
@@ -14,13 +14,13 @@ root.render(
1414
</React.StrictMode>
1515
);
1616

17-
// Register service worker for offline support
18-
serviceWorker.register({
19-
onUpdate: (registration) => {
20-
// Show update notification to user
21-
console.log('New version available! Refresh to update.');
22-
},
23-
onSuccess: (registration) => {
24-
console.log('App is ready for offline use!');
25-
}
26-
});
17+
// Service worker disabled for GitHub Pages deployment
18+
// serviceWorker.register({
19+
// onUpdate: (registration) => {
20+
// // Show update notification to user
21+
// console.log('New version available! Refresh to update.');
22+
// },
23+
// onSuccess: (registration) => {
24+
// console.log('App is ready for offline use!');
25+
// }
26+
// });

0 commit comments

Comments
 (0)