Skip to content

Commit 8501642

Browse files
deployment fixes
1 parent 625b058 commit 8501642

7 files changed

Lines changed: 65 additions & 60 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy Vite React to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
23+
- run: npm ci
24+
- run: npm run build
25+
26+
- uses: actions/upload-pages-artifact@v3
27+
with:
28+
path: dist
29+
30+
deploy:
31+
needs: build
32+
runs-on: ubuntu-latest
33+
environment:
34+
name: github-pages
35+
36+
steps:
37+
- uses: actions/deploy-pages@v4

.github/workflows/jekyll-gh-pages.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
5+
<link rel="icon" type="image/svg+xml" href="./vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>TokenStream - Stream Salaries Instantly</title>
88
</head>

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"homepage": "https://deepakpalrocks.github.io/TokenStream_frontend",
32
"name": "tokenstream-frontend",
43
"private": true,
54
"version": "0.0.0",
@@ -8,13 +7,10 @@
87
"dev": "vite",
98
"build": "vite build",
109
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
11-
"preview": "vite preview",
12-
"deploy": "gh-pages -d dist",
13-
"predeploy": "npm run build"
10+
"preview": "vite preview"
1411
},
1512
"dependencies": {
1613
"ethers": "^6.9.0",
17-
"gh-pages": "^6.3.0",
1814
"react": "^18.2.0",
1915
"react-dom": "^18.2.0"
2016
},

public/.nojekyll

Whitespace-only changes.

public/404.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>TokenStream - Stream Salaries Instantly</title>
6+
<script type="text/javascript">
7+
// Single Page Apps for GitHub Pages
8+
// https://github.com/rafgraph/spa-github-pages
9+
var pathSegmentsToKeep = 1;
10+
var l = window.location;
11+
l.replace(
12+
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
13+
l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' +
14+
l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
15+
(l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') +
16+
l.hash
17+
);
18+
</script>
19+
</head>
20+
<body>
21+
</body>
22+
</html>
23+

vite.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { defineConfig } from "vite"
2-
import react from "@vitejs/plugin-react"
1+
import { defineConfig } from 'vite'
2+
import react from '@vitejs/plugin-react'
33

44
export default defineConfig({
55
plugins: [react()],
6-
base: "/TokenStream_frontend/"
6+
base: '/TokenStream_frontend/',
77
})

0 commit comments

Comments
 (0)