Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

153
Vistas
Github and vue.Js

I'm a beginner and I'm learning javascript and vueJs.

i want to deploy my first vuejs app but it's impossible. I lost hours but I can't do it anymore. I have to ask for help.

When i deploy, i have a blank page.

My vue.config.js:

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({   transpileDependencies: true,  
publicPath:process.env.NODE_ENV === 'production' 
?'/My-repo/'  
: '/'
})

And My deploy.bat file:

# 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://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git main

# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f git@github.com:myUsername/myRepository.git master:gh-pages

cd -

thank you for your help.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Thanks for your answers guys.

If it can help others.

On Ubuntu, with VSCode I created the deploy.sh file:

#!/usr/bin/env sh

# abort on errors
set -e

# build
npm run build

# navigate into the build output directory
cd dist
    
git init
git add -A
git commit -m 'deploy'

# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f git@github.com:<USERNAME>/<REPO>.git master:gh-pages


cd -

then I entered following code in terminal of vscode:

chmod +x deploy.sh

then

ssh-keygen -t ed25519 -C "<Your@email.com>"
  • copy the key
  • go to settings in Github
  • Add new SSH Key

Then go to package.json and add "deploy":"sh deploy.sh" in scripts:

"scripts":{
"deploy":"sh deploy.sh"
},

then in Terminal:

npm run deploy

In github go to:

  • your repository
  • chose "gh-pages" branch
  • go to settings
  • go to Pages
  • chose -> Branch: gh-pages
  • Then click on the link.

Thank you everyone and have a nice day. And sorry for my poor English ;)

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda