From ed8937a7495e84c3aef9ae04ac63012fce90ad92 Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 1 Dec 2022 16:26:45 +0100 Subject: combine PDFs and website with same resource paths --- .gitlab-ci.yml | 7 ++----- flake.nix | 12 ++++++------ index.md | 11 +++++++++-- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ebb1ee7..83c7b38 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,11 +8,11 @@ flake: script: - nix build .# - - cp -Lr result out + - cp -Lr result public artifacts: paths: - - out/ + - public pages: stage: publish @@ -20,9 +20,6 @@ pages: only: - main - script: - - cp -r out/website public - artifacts: paths: - public diff --git a/flake.nix b/flake.nix index 0207949..034d857 100644 --- a/flake.nix +++ b/flake.nix @@ -65,12 +65,12 @@ # Everything combined default = runCommand "combined" { } '' - mkdir -p "$out" - cp -Lr ${pdf-slides} "$out/slides" - cp -Lr ${pdf-exercises} "$out/exercises" - cp -Lr ${pdf-solutions} "$out/solutions" - cp -Lr ${website-public} "$out/website" --no-preserve=mode - cp -Lr ${website-private} "$out/website/${solutionsSecret}" + cp -Lr --no-preserve=mode ${website-public} "$out" + cp -Lr --no-preserve=mode ${website-private} "$out/${solutionsSecret}" + cp -Lr ${pdf-slides}/* "$out/lectures" + cp -Lr ${pdf-exercises}/* "$out/exercises" + cp -Lr ${pdf-slides}/* "$out/${solutionsSecret}/lectures" + cp -Lr ${pdf-solutions}/* "$out/${solutionsSecret}/exercises" ''; }; diff --git a/index.md b/index.md index eb78285..14a5633 100644 --- a/index.md +++ b/index.md @@ -17,18 +17,25 @@ Outputs: solutions, for the students. * A private website with the solutions to the exercises, for the teaching - staff. + staff, at a "secret" address defined in `flake.nix`. * PDF Beamer presentations for the lectures. + Those can be downloaded from the website by replacing `.html` with `.pdf` in + the URL. * PDF exercise sheets, with and without solutions, for printing for work sessions without a computer. + Those can be downloaded from the website by replacing `.html` with `.pdf` in + the URL. ## Links - Deployed site: - + - Public (for students): + + - Private (with exercise solutions, for the teachers): + - Source repository: -- cgit v1.2.3