Commit bf622905 authored by Matija Obreza's avatar Matija Obreza

Gitlab CI

parent a7a58f41
*.iml
.idea/
/target/
node_modules
variables:
ARTIFACTS: "target/app"
stages:
- build
- publish
.package_template: &node_package
image: node:8.4-alpine
cache:
paths:
- node_modules/
before_script:
- npm install
artifacts:
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}"
expire_in: 1 day
paths:
- ${ARTIFACTS}
webpack:
<<: *node_package
stage: build
script:
- npm run build
pages:
stage: publish
stage: publish
only:
- master
script:
# Make public dir for the first run
- mkdir -p public
# move scripts to pages folder
- cp *css *js index.html public/
- cp -r ${ARTIFACTS}/* public/
artifacts:
paths:
- public
expire_in: 30 minute
expire_in: 30 minute
......@@ -7,7 +7,7 @@ module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.join(process.cwd(), 'target')
path: path.join(process.cwd(), 'target/app')
},
module: {
rules: [
......
......@@ -1041,7 +1041,8 @@
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true
},
"coa": {
"version": "1.0.4",
......@@ -1704,6 +1705,7 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz",
"integrity": "sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==",
"dev": true,
"requires": {
"async": "2.6.0",
"loader-utils": "1.1.0",
......@@ -1715,6 +1717,7 @@
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"dev": true,
"requires": {
"co": "4.6.0",
"fast-deep-equal": "1.0.0",
......@@ -1726,6 +1729,7 @@
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz",
"integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=",
"dev": true,
"requires": {
"ajv": "5.5.2"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment