Created
August 30, 2020 21:53
-
-
Save neilgaietto/0e73043d38653c98e366897c13e7e333 to your computer and use it in GitHub Desktop.
gitlab CI for deploying a quasar app to gitlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copied from Quasar Discord | |
gitlab CI for deploying a quasar app to gitlab | |
# Modified from https://knasmueller.net/vue-js-on-gitlab-pages | |
pages: | |
image: node:latest | |
stage: deploy | |
script: | |
- npm install -g @quasar/cli | |
- npm install --progress=false | |
- quasar build | |
# GitLab requires all the static page files to be in /public | |
# Because Quasar uses /public for files, they will be deleted after | |
# "compilation" and the compiled files will be moved to public. | |
- rm -rf public | |
- mkdir public | |
- cp -r dist/spa/* public | |
artifacts: | |
expire_in: 1 day | |
paths: | |
- public | |
only: | |
- master | |
the quasar.conf.js also needs | |
publicPath: process.env.NODE_ENV === 'production' ? '/repositoryPath/' : '/', |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment