puts "Error: Folderstructure has changed!". absolute_path ( './_site/2016/12/tresorsgx/index.html' ) if ! File. run puts 'Your website is now tested!' end desc 'Test the post structure to be sure no links to the site break' task :test_structure do puts 'Testing post structure'. My Gemfile looks like that:ĭesc 'Test the site, depends on build' task :test_html do puts 'Testing your website with HTMLProofer'. Then create a Gemfile where you list all your dependencies for the project. Install Rubygems with the Gemfile and Bundle In order to use the bundle you have to install it (eg. To make everything as reproduce able as possible we will use bundle as our virtual environment for Ruby. Rake and BundleĪ rakefile is code written in Ruby. We will later call Rake tasks from our command line and the gitlab-ci.yml file. We will use the Rakefile as middleman between the GitLab CI script and the Jekyll codebase. Jekyll is written in Ruby, so why don’t use it to automate it. Just like the gitlab-ci file does task automation in GitLab, a Rakefile automates Ruby tasks. Gitlab CI Pipelines for build, test and deploy.Gitlab GIT repository as central repository.That was one of the reasons why I published so few posts in the past - the effort to publish changes was just to high.Įnough motivation to integrate everything in a pipeline. Needless to say that this procedure takes some time. If i had a state where I was confident that it is good enough to be published at, i pushed the files manually in Filezilla. In the past I developed the blog on my local machine, using jekyll serve to preview changes I made. I describe how to use Bundle and Rake to create a virtual Ruby environment and how to use GitLab CI to execute the automation tasks. In this post I want to provide a complete tutorial on how to automatically build, test, integrate and deploy a Jekyll site to a FTP server. I also used CI/CD methods to automate the generation of my LaTeX Awesome CV. Some of them were Javascript applications, others Python Flask REST Backends and Jekyll apps. In the last month I implemented CI/CD in multiple projects.
0 Comments
Leave a Reply. |