Commit bf622905 authored by Matija Obreza's avatar Matija Obreza

Gitlab CI

parent a7a58f41
*.iml *.iml
.idea/ .idea/
/target/ /target/
node_modules
variables:
ARTIFACTS: "target/app"
stages: stages:
- build
- publish - 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: pages:
stage: publish stage: publish
only: only:
- master - master
script: script:
# Make public dir for the first run # Make public dir for the first run
- mkdir -p public - mkdir -p public
# move scripts to pages folder # move scripts to pages folder
- cp *css *js index.html public/ - cp -r ${ARTIFACTS}/* public/
artifacts: artifacts:
paths: paths:
- public - public
expire_in: 30 minute expire_in: 30 minute
...@@ -7,7 +7,7 @@ module.exports = { ...@@ -7,7 +7,7 @@ module.exports = {
entry: './src/index.js', entry: './src/index.js',
output: { output: {
filename: 'bundle.js', filename: 'bundle.js',
path: path.join(process.cwd(), 'target') path: path.join(process.cwd(), 'target/app')
}, },
module: { module: {
rules: [ rules: [
......
...@@ -1041,7 +1041,8 @@ ...@@ -1041,7 +1041,8 @@
"co": { "co": {
"version": "4.6.0", "version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true
}, },
"coa": { "coa": {
"version": "1.0.4", "version": "1.0.4",
...@@ -1704,6 +1705,7 @@ ...@@ -1704,6 +1705,7 @@
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz", "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==", "integrity": "sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==",
"dev": true,
"requires": { "requires": {
"async": "2.6.0", "async": "2.6.0",
"loader-utils": "1.1.0", "loader-utils": "1.1.0",
...@@ -1715,6 +1717,7 @@ ...@@ -1715,6 +1717,7 @@
"version": "5.5.2", "version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"dev": true,
"requires": { "requires": {
"co": "4.6.0", "co": "4.6.0",
"fast-deep-equal": "1.0.0", "fast-deep-equal": "1.0.0",
...@@ -1726,6 +1729,7 @@ ...@@ -1726,6 +1729,7 @@
"version": "0.3.0", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz",
"integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=",
"dev": true,
"requires": { "requires": {
"ajv": "5.5.2" "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