Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

152
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda