Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This config is inspired by https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml

name: Deploy Scribouilli site to GitHub Pages with a custom theme

on:
push:
repository_dispatch:
types: atelier-scribouilli

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
# cf. https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable
# Run job only on default branch (as $default_branch variable only works on
# workflow templates)
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1 # Per recommandation https://github.com/ruby/setup-ruby?tab=readme-ov-file#versioning
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 1 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: bundle install
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build
env:
JEKYLL_ENV: production
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
# cf. https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable
# Run job only on default branch (as $default_branch variable only works on
# workflow templates)
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
31 changes: 31 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
default:
image: ruby:3.2.2
cache:
- key:
files:
- Gemfile.lock
paths:
- vendor/bundle
before_script:
- gem install bundler
- bundle config set --local path "vendor/bundle"
- bundle install

stages:
- deploy


pages:
stage: deploy
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
script:
- bundle exec jekyll build -d public
- gzip -k -9 $(find public -iname '*.html' -o -iname '*.css' -o -iname '*.js' -o -iname '*.json') || true
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH

1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.2
43 changes: 43 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
source "https://rubygems.org"

gem "jekyll", "~> 4.3.2"

# Jekyll theme for Scribouilli
gem "mimoza", git: "https://github.com/Scribouilli/mimoza.git", branch: "main"

group :jekyll_plugins do
gem "jekyll-git-hash", "~> 0.1.1"

# Handle redirections
gem "jekyll-redirect-from", "~> 0.16"

# Atom feed on Jekyll posts
gem "jekyll-feed", "~> 0.17"

# Pagination
gem "jekyll-paginate-v2", "~> 3.0"

# SEO tags
gem "jekyll-seo-tag", "~> 2.8"

# Generate a sitemap
gem "jekyll-sitemap", "~> 1.4"

# Enable Jekyll to read custom YAML front matter
gem "jekyll-optional-front-matter", "~> 0.3"

# Add default layouts to pages and posts
gem "jekyll-default-layout", "~> 0.1.5"

# Generate default titles from headings
gem "jekyll-titles-from-headings", "~> 0.5.3"
end

group :development do
gem "dotenv", "~> 2.7"
gem "webrick", "~> 1.7"
end

group :test do
gem 'rspec'
end
9 changes: 8 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
remote_theme: scribouilli/mimoza
collections:
projects:
output: true
plugins:
- jekyll-feed
- jekyll-git-hash
theme: mimoza
scribouilli: true