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