Skip to content

Commit

Permalink
init tracis ci
Browse files Browse the repository at this point in the history
  • Loading branch information
fauguste committed Oct 3, 2018
1 parent 46d0079 commit 73e6669
Show file tree
Hide file tree
Showing 12 changed files with 85 additions and 92 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
_site
.sass-cache
.jekyll-metadata
Gemfile.lock
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
language: ruby
rvm:
- 2.4.1
jdk:
- openjdk7

before_script:
- chmod +x ./script/cibuild
- chmod +x deploy

script: ./script/cibuild

env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer

addons:
apt:
packages:
- libcurl4-openssl-dev

sudo: false # route your build to the container-based infrastructure for a faster build

cache: bundler # caching bundler gem packages will speed up build

# Optional: disable email notifications about the outcome of your builds
notifications:
email: false

deploy:
provider: script
script: bash deploy
skip_cleanup: true
on:
tags: true
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gem "jekyll", "~> 3.8.4"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
gem "html-proofer"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
Expand Down
87 changes: 0 additions & 87 deletions Gemfile.lock

This file was deleted.

12 changes: 12 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Site wiki.adire.eu.com

[![Build Status](https://travis-ci.org/fauguste/wiki.adire.eu.com.svg?branch=master)](https://travis-ci.org/fauguste/wiki.adire.eu.com)

## Prérequis

[jekyll](https://jekyllrb.com/docs/installation/)

## Lancer un serveur local
````
bundle exec jekyll serve
````
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ email: [email protected]
description: >- # this means to ignore newlines until "baseurl:"
Bienvenue sur la base de connaissance de la société Adire.
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
url: "https://wiki.adire.eu.com" # the base hostname & protocol for your site, e.g. http://example.com

# Build settings
markdown: kramdown
Expand Down
18 changes: 14 additions & 4 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">
<img src="/images/ADIRE_Logo.png" width="60" height="30" alt="">
<img src="/images/ADIRE_Logo.png" width="60" height="30" alt="logo adire">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
{% for item in site.menus.header %}
<li class="nav-item dropdown menu-item-{{ loop.index }}">
<li class="nav-item dropdown menu-item-{{ item.weight }}">
{% if item.url %}
<a class="nav-link" href="{{ item.url }}">{{ item.title }}</a>
{% else %}
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ item.title }}</a>
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown-{{ item.weight }}" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ item.title }}</a>
{% endif %}
{% if item.children %}
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<div class="dropdown-menu" aria-labelledby="navbarDropdown-{{ item.weight }}">

{% for item in item.children %}
<a class="dropdown-item" href="{{ item.url }}">{{ item.title }}</a>
Expand All @@ -49,6 +49,16 @@
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45805037-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-45805037-1');
</script>

</body>

</html>
2 changes: 2 additions & 0 deletions deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gem install s3_website
s3_website push
Binary file modified images/ADIRE_Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Sitemap: https://wiki.adire.eu.com/sitemap.xml
11 changes: 11 additions & 0 deletions s3_website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
s3_id: <%= ENV['S3_ACCESS_KEY_ID'] %>
s3_secret: <%= ENV['S3_SECRET_KEY'] %>
s3_bucket: wiki.adire.eu.com

max_age: 3000
cache_control: public, no-transform, max-age=1200, s-maxage=1200

ignore_on_server:
- Readme.md
- script
- deploy
6 changes: 6 additions & 0 deletions script/cibuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e # halt script on error

gem install s3_website

bundle exec jekyll build

0 comments on commit 73e6669

Please sign in to comment.