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