Skip to content

Commit

Permalink
deployment settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jehosephat committed Sep 13, 2024
1 parent a0ea005 commit 4a6aa7b
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ nest-cli.json
.cache
.output
.env
dist
# dist

# Dependency directories
node_modules/
Expand Down
21 changes: 21 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/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'

git push -f git@github.com:jehosephat/gala-faucet.git master: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",
"serve": "vite preview",
"type-check": "vue-tsc --noEmit"
"type-check": "vue-tsc --noEmit",
"deploy": "sh deploy.sh"
},
"dependencies": {
"@gala-chain/connect": "^1.4.2",
Expand Down
25 changes: 16 additions & 9 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'url'

export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
return {
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
port: 3000
},
base: '/gala-faucet/',
define: {
__APP_ENV__: env.APP_ENV
}
},
server: {
port: 3000
}
})

0 comments on commit 4a6aa7b

Please sign in to comment.