Migration from gitlab pages

main
theodugautier 2025-08-31 17:01:26 +02:00
parent b0d7b890d4
commit ccf8ed3be9
2 changed files with 44 additions and 44 deletions

View File

@ -1,43 +1,43 @@
variables:
DART_SASS_VERSION: 1.79.2
HUGO_VERSION: 0.134.2
NODE_VERSION: 20.x
GIT_DEPTH: 0
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: recursive
TZ: Europe/Paris
image:
name: golang:1.22.1-bookworm
pages:
script:
# Install brotli
- apt-get update
- apt-get install -y brotli
# Install Dart Sass
- curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
- tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
- cp -r dart-sass/ /usr/local/bin
- rm -rf dart-sass*
- export PATH=/usr/local/bin/dart-sass:$PATH
# Install Hugo
- curl -LJO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
- apt-get install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb
- rm hugo_extended_${HUGO_VERSION}_linux-amd64.deb
# Install Node.js
- curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
- apt-get install -y nodejs
# Install Node.js dependencies
- "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
# Build
- hugo --gc --minify
# Compress
- find public -type f -regex '.*\.\(css\|html\|js\|txt\|xml\)$' -exec gzip -f -k {} \;
- find public -type f -regex '.*\.\(css\|html\|js\|txt\|xml\)$' -exec brotli -f -k {} \;
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# variables:
# DART_SASS_VERSION: 1.79.2
# HUGO_VERSION: 0.134.2
# NODE_VERSION: 20.x
# GIT_DEPTH: 0
# GIT_STRATEGY: clone
# GIT_SUBMODULE_STRATEGY: recursive
# TZ: Europe/Paris
#
# image:
# name: golang:1.22.1-bookworm
#
# pages:
# script:
# # Install brotli
# - apt-get update
# - apt-get install -y brotli
# # Install Dart Sass
# - curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
# - tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
# - cp -r dart-sass/ /usr/local/bin
# - rm -rf dart-sass*
# - export PATH=/usr/local/bin/dart-sass:$PATH
# # Install Hugo
# - curl -LJO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
# - apt-get install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb
# - rm hugo_extended_${HUGO_VERSION}_linux-amd64.deb
# # Install Node.js
# - curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
# - apt-get install -y nodejs
# # Install Node.js dependencies
# - "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
# # Build
# - hugo --gc --minify
# # Compress
# - find public -type f -regex '.*\.\(css\|html\|js\|txt\|xml\)$' -exec gzip -f -k {} \;
# - find public -type f -regex '.*\.\(css\|html\|js\|txt\|xml\)$' -exec brotli -f -k {} \;
# artifacts:
# paths:
# - public
# rules:
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
#

View File

@ -9,4 +9,4 @@ Notre boxe est une pratique ouverte à toustes, peu importe le genre, lâge o
**Contribuer au projet :**
Si vous souhaitez participer en rédigeant un cours et en le soumettant pour publication, le site est développé avec Hugo (un générateur de sites statiques) et le code source est accessible en open source : [https://gitlab.com/torpenn/bagarrons-nous](https://gitlab.com/torpenn/bagarrons-nous). Vous pouvez y proposer vos modifications directement.
Si vous souhaitez participer en rédigeant un cours et en le soumettant pour publication, le site est développé avec Hugo (un générateur de sites statiques) et le code source est accessible en open source : [https://code.morlaer.netlib.re/admin1312/bagarrons-nous](https://code.morlaer.netlib.re/admin1312/bagarrons-nous). Vous pouvez y proposer vos modifications directement.