diff --git a/luckydiamond/deploy.gitlab-ci.yml b/luckydiamond/deploy.gitlab-ci.yml new file mode 100644 index 0000000..ee64dcb --- /dev/null +++ b/luckydiamond/deploy.gitlab-ci.yml @@ -0,0 +1,17 @@ +# .gitlab-ci.yml file to be placed in the root of your repository + +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 with 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 \ No newline at end of file diff --git a/luckydiamond/deploy.sh b/luckydiamond/deploy.sh index 7d476fb..2ff4627 100644 --- a/luckydiamond/deploy.sh +++ b/luckydiamond/deploy.sh @@ -23,5 +23,6 @@ git commit -m 'deploy' # git pull origin # git push -f git@github.com:danilt2000/LuckyDiamond.git main:gh-pages git subtree push --prefix dist origin gh-pages +git subtree push --prefix dist origin gh-pages cd - \ No newline at end of file diff --git a/luckydiamond/vue.config.js b/luckydiamond/vue.config.js index 17382aa..b5d6928 100644 --- a/luckydiamond/vue.config.js +++ b/luckydiamond/vue.config.js @@ -2,6 +2,6 @@ module.exports = { publicPath: process.env.NODE_ENV === 'production' - ? '/LuckyDiamond/' + ? '/' + process.env.CI_PROJECT_NAME + '/' : '/' } \ No newline at end of file