Skip to content

Commit 4f38197

Browse files
committed
Gitlab hosting config added
1 parent 467e966 commit 4f38197

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.gitlab-ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# .gitlab-ci.yml file to be placed in the root of your repository
2+
# Guide from https://cli.vuejs.org/guide/deployment.html#gitlab-pages
3+
4+
pages: # the job must be named pages
5+
image: node:latest
6+
stage: deploy
7+
script:
8+
- npm ci
9+
- npm run build
10+
- mv public public-vue # GitLab Pages hooks on the public folder
11+
- mv dist public # rename the dist folder (result of npm run build)
12+
# optionally, you can activate gzip support wih the following line:
13+
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
14+
artifacts:
15+
paths:
16+
- public # artifact path must be /public for GitLab Pages to pick it up
17+
only:
18+
- master

vue.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// vue.config.js file to be place in the root of your repository
2+
3+
module.exports = {
4+
publicPath: process.env.NODE_ENV === 'production'
5+
? '/' + process.env.CI_PROJECT_NAME + '/'
6+
: '/'
7+
}

0 commit comments

Comments
 (0)