Skip to content

Commit

Permalink
Deploying site
Browse files Browse the repository at this point in the history
  • Loading branch information
TimAtoyo committed Feb 7, 2024
1 parent 11e5c69 commit fe65b49
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
28 changes: 28 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env sh
# abort on errors
set -e

# build
npm run build

# navigate into the build output directory
cd dist

# place .nojekyll to bypass Jekyll processing
echo > .nojekyll

# if you are deploying to a custom domain
# echo 'www.example.com' > CNAME

git init
git checkout -B main
git add -A
git commit -m 'deploy'

# if you are deploying to https://<USERNAME>.github.io
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git main

# if you are deploying to https://<USERNAME>.github.io/<REPO>
# git push -f [email protected]:<USERNAME>/<REPO>.git main:gh-pages

cd -
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"deploy": "gh-pages -d dist"
},
"dependencies": {
"@heroicons/react": "^2.1.1",
Expand Down
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ export default defineConfig({
open: true,
port: 3000
},
base: '/portfolio-react/',
})

0 comments on commit fe65b49

Please sign in to comment.