diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..ded329e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ + +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) + # optionally, you can activate gzip support wih the following line: + - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \; + artifacts: + paths: + - public # artifact path must be /public for GitLab Pages to pick it up + only: + - master diff --git a/vue.config.js b/vue.config.js index ef6e86b..2df28fe 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,8 @@ module.exports = { - "transpileDependencies": [ - "vuetify" - ] + "transpileDependencies": [ + "vuetify" + ], + publicPath: process.env.NODE_ENV === 'production' + ? '/' + process.env.CI_PROJECT_NAME + '/' + : '/' } \ No newline at end of file