From c887ee3c82fdbb7381efa2140f98ccdeca29dbbf Mon Sep 17 00:00:00 2001 From: nzambello Date: Mon, 13 Dec 2021 20:17:10 +0100 Subject: [PATCH] chore: add deploy config --- deploy.sh | 25 +++++++++++++++++++++++++ vite.config.ts | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..6bb4725 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env sh + +# abort on errors +set -e + +# build +npm run build + +# navigate into the build output directory +cd dist + +# if you are deploying to a custom domain +# echo 'www.example.com' > CNAME + +git init +git add -A +git commit -m 'deploy' + +# if you are deploying to https://.github.io +# git push -f git@github.com:/.github.io.git main + +# if you are deploying to https://.github.io/ +git push -f git@github.com:nzambello/walk-up-alarm.git main:gh-pages + +cd - diff --git a/vite.config.ts b/vite.config.ts index c7e27df..01f6350 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,5 +4,6 @@ import { VitePWA } from "vite-plugin-pwa"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react(), VitePWA()], + base: "/walk-up-alarm/", + plugins: [react(), VitePWA()], });