Commit 39598567 authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

ci: experimentation with nix

parent f90aba5c
Loading
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
.nix:
  image: nixos/nix:2.24.9
  before_script:
  - apt-get -q update
  - env DEBIAN_FRONTEND=noninteractive apt-get -q -y install jekyll make ruby-jekyll-redirect-from ruby-jekyll-polyglot ruby-jekyll-sitemap po4a python3-yaml git
    - echo "experimental-features = nix-command flakes" >>/etc/nix/nix.conf

test:
  image: debian:stable-backports
  extends: .nix
  script:
    - make
    - make lint
    - nix build .#reproducible-website
    - cp -vr --dereference $(readlink -f result) output
    - mv output _site

  artifacts:
    paths:
      - _site/*
  environment:
    name: HTML
    url: 'https://$CI_PROJECT_NAMESPACE.pages.debian.net/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/_site/index.html'
    url: "https://$CI_PROJECT_NAMESPACE.pages.debian.net/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/_site/index.html"