Skip to content

Commit 1ee2508

Browse files
committed
Deploying site
1 parent fc2d69b commit 1ee2508

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

Diff for: deploy.sh

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env sh
2+
# abort on errors
3+
set -e
4+
5+
# build
6+
npm run build
7+
8+
# navigate into the build output directory
9+
cd dist
10+
11+
# place .nojekyll to bypass Jekyll processing
12+
echo > .nojekyll
13+
14+
# if you are deploying to a custom domain
15+
# echo 'www.example.com' > CNAME
16+
17+
git init
18+
git checkout -B main
19+
git add -A
20+
git commit -m 'deploy'
21+
22+
# if you are deploying to https://<USERNAME>.github.io
23+
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git main
24+
25+
# if you are deploying to https://<USERNAME>.github.io/<REPO>
26+
git push -f [email protected]:Sam-MARTis/About-Me.git main:gh-pages
27+
28+
29+
cd -

Diff for: package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": "vite",
88
"build": "vite build",
99
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
10-
"preview": "vite preview"
10+
"preview": "vite preview",
11+
"deploy": "gh-pages -d dist"
1112
},
1213
"dependencies": {
1314
"react": "^18.2.0",

Diff for: vite.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react'
44
// https://vitejs.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7+
base: '/About-Me',
78
})

0 commit comments

Comments
 (0)