diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 671ce830f4542aa997c2acc467f7024d45d31284..903a7c036b9b5f09ae7d96806e8b8b552c497c15 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ image: "node:lts-alpine" stages: - - build + - lint - deploy # global cache settings for all jobs @@ -18,27 +18,27 @@ cache: policy: pull # prevent subsequent jobs from modifying cache before_script: + # https://stackoverflow.com/a/75624610 + - cp ${PRODUCTION_ENV_FILE} .env.production # define cache dir & use it npm! - npm ci --cache node_modules/ --prefer-offline # # monorepo users: run secondary install actions # - npx lerna bootstrap -- --cache .npm/ --prefer-offline - - npm run build + -build: - stage: build +lint: + stage: lint # global cache settings are inherited to grab `node_modules` script: + - node --version - npm run lint - artifacts: - paths: - - dist/ # where ever your build results are stored pages: stage: deploy when: on_success # only if previous stages' jobs all succeeded # override inherited cache settings since node_modules is not needed script: - - mv dist public + - npm run build artifacts: paths: - public diff --git a/README.md b/README.md index 889c5809254437112fbe4f731236f47920a85e4e..2226246646c981d9cf9e39228a4d30c215ce2781 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,22 @@ ## Project setup ``` -yarn install +npm install ``` ### Compiles and hot-reloads for development ``` -yarn serve +npm run serve ``` ### Compiles and minifies for production ``` -yarn build +npm run build ``` ### Lints and fixes files ``` -yarn lint +npm run lint ``` ### Customize configuration diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index df36fcfb72584e00488330b560ebcf34a41c64c2..0000000000000000000000000000000000000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 3e5a13962197105f2078d2a224cc57dfa09b4893..0000000000000000000000000000000000000000 --- a/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - -
- - - diff --git a/vue.config.js b/vue.config.js index 910e297e0f53483455d2aa432887c3b7975d6c11..2b4179fed550f0b286ca25a661f0d77c6ee532fe 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,4 +1,8 @@ const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ - transpileDependencies: true + transpileDependencies: true, + outputDir: 'public', + publicPath: process.env.NODE_ENV === 'production' + ? process.env.VUE_APP_BASE_URL + : '/' })