Verified Commit 8f34dc12 authored by David Haynes's avatar David Haynes 🙆

Gitlab pages on new build system

- woop
parent 95d2afdb
Pipeline #1585 failed with stages
in 1 minute and 12 seconds
image: node:latest
before_script:
- yarn
- npm install -g gulp
build:
stage: build
script:
- yarn
- npm install -g gulp
- gulp build
artifacts:
paths:
- build/js
- build/css
- build/fonts
pages:
script:
- gulp build
artifacts:
paths:
- public
......@@ -14,6 +14,11 @@ const connect = require('gulp-connect');
const src = './src'
const dest = './build'
// Move fonts to build/fonts
gulp.task('fonts', () => gulp.src('./node_modules/font-awesome/fonts/fontawesome-webfont.woff2').pipe(connect.reload())
.pipe(gulp.dest(dest + '/fonts/'))
);
// Move html to build/html
gulp.task('html', () => gulp.src(src + '/html/*.html').pipe(connect.reload())
.pipe(gulp.dest(dest))
......@@ -22,7 +27,7 @@ gulp.task('html', () => gulp.src(src + '/html/*.html').pipe(connect.reload())
// Optimize images and move them to build/img
gulp.task('img', () => gulp.src(src + '/img/*').pipe(connect.reload())
.pipe(imagemin())
.pipe(gulp.dest(dest + '/img'))
.pipe(gulp.dest(dest + '/img/'))
);
// Move required js files to build/js
......@@ -71,7 +76,7 @@ gulp.task('http', () => {
});
// Run all tasks
gulp.task('build', ['sass', 'html', 'img', 'js']);
gulp.task('build', ['sass', 'html', 'img', 'js', 'fonts']);
// By default, run all tasks and then rebuild on changes
gulp.task('default', ['http', 'build', 'watch']);
\ No newline at end of file
......@@ -31,12 +31,11 @@
<title>Masonstrap &bull; Home</title>
<!-- Load in static content -->
<link rel="icon" href="assets/img/favicon.ico" sizes="16x16">
<link rel="stylesheet" href="assets/css/masonstrap.min.css" media="screen">
<link rel="icon" href="/img/favicon.ico" sizes="16x16">
<link rel="stylesheet" href="/css/masonstrap.min.css" media="screen">
</head>
<body>
</body>
<footer>
......@@ -44,7 +43,7 @@
</footer>
<!-- load in external js -->
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/popper.min.js"></script>
<script src="/assets/js/bootstrap.min.js"></script>
<script src="/js/jquery.min.js"></script>
<script src="/js/popper.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</html>
\ No newline at end of file
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