Deploy to Gitlab Pages using Gitlab CI
superlulu opened this issue · comments
Hello Folks,
I'm trying to deploy my vue/webpack-App to Gitlab pages following this quick tutorial:
Deploy Vue CLI to Gitlab Pages
there it says the .gitlab-ci-yml file should contain following Code:
pages: # the job must be named pages
image: node:latest
stage: deploy
script:
- npm ci
- npm run build
- mv public public-vue # GitLab Pages hooks on the public folder
- mv dist public # rename the dist folder (result of npm run build)
artifacts:
paths:
- public # artifact path must be /public for GitLab Pages to pick it up
only:
- master
But the Job Pipeline Fails due to the fact that there is no public folder in this template to move.
$ mv public public-vue
mv: cannot stat 'public': No such file or directory
ERROR: Job failed: exit code 1
Has anyone a suggestion on how to get the .gitlab-ci.yml file to work for the webpack template?
Wow, that was simple. removing - mv public public-vue
from the script since there is no public folder does the trick. Closing this.
@superlulu I think you need to create public folder first.
- npm run build
- mkdir .public
- mv .public public-vue # GitLab Pages hooks on the public folder