summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2022-12-01 16:26:45 +0100
committerpacien2022-12-01 16:26:56 +0100
commited8937a7495e84c3aef9ae04ac63012fce90ad92 (patch)
tree63b547fb03f07a568ac94a074ead31a18fc67d14
parent8e67a740fc8346acd2b0e0d6b483698e5300281d (diff)
downloadmarkdown-course-website-ed8937a7495e84c3aef9ae04ac63012fce90ad92.tar.gz
combine PDFs and website with same resource paths
-rw-r--r--.gitlab-ci.yml7
-rw-r--r--flake.nix12
-rw-r--r--index.md11
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:
8 8
9 script: 9 script:
10 - nix build .# 10 - nix build .#
11 - cp -Lr result out 11 - cp -Lr result public
12 12
13 artifacts: 13 artifacts:
14 paths: 14 paths:
15 - out/ 15 - public
16 16
17pages: 17pages:
18 stage: publish 18 stage: publish
@@ -20,9 +20,6 @@ pages:
20 only: 20 only:
21 - main 21 - main
22 22
23 script:
24 - cp -r out/website public
25
26 artifacts: 23 artifacts:
27 paths: 24 paths:
28 - public 25 - public
diff --git a/flake.nix b/flake.nix
index 0207949..034d857 100644
--- a/flake.nix
+++ b/flake.nix
@@ -65,12 +65,12 @@
65 65
66 # Everything combined 66 # Everything combined
67 default = runCommand "combined" { } '' 67 default = runCommand "combined" { } ''
68 mkdir -p "$out" 68 cp -Lr --no-preserve=mode ${website-public} "$out"
69 cp -Lr ${pdf-slides} "$out/slides" 69 cp -Lr --no-preserve=mode ${website-private} "$out/${solutionsSecret}"
70 cp -Lr ${pdf-exercises} "$out/exercises" 70 cp -Lr ${pdf-slides}/* "$out/lectures"
71 cp -Lr ${pdf-solutions} "$out/solutions" 71 cp -Lr ${pdf-exercises}/* "$out/exercises"
72 cp -Lr ${website-public} "$out/website" --no-preserve=mode 72 cp -Lr ${pdf-slides}/* "$out/${solutionsSecret}/lectures"
73 cp -Lr ${website-private} "$out/website/${solutionsSecret}" 73 cp -Lr ${pdf-solutions}/* "$out/${solutionsSecret}/exercises"
74 ''; 74 '';
75 }; 75 };
76 76
diff --git a/index.md b/index.md
index eb78285..14a5633 100644
--- a/index.md
+++ b/index.md
@@ -17,18 +17,25 @@ Outputs:
17 solutions, for the students. 17 solutions, for the students.
18 18
19* A private website with the solutions to the exercises, for the teaching 19* A private website with the solutions to the exercises, for the teaching
20 staff. 20 staff, at a "secret" address defined in `flake.nix`.
21 21
22* PDF Beamer presentations for the lectures. 22* PDF Beamer presentations for the lectures.
23 Those can be downloaded from the website by replacing `.html` with `.pdf` in
24 the URL.
23 25
24* PDF exercise sheets, with and without solutions, for printing for work 26* PDF exercise sheets, with and without solutions, for printing for work
25 sessions without a computer. 27 sessions without a computer.
28 Those can be downloaded from the website by replacing `.html` with `.pdf` in
29 the URL.
26 30
27 31
28## Links 32## Links
29 33
30- Deployed site: 34- Deployed site:
31 <https://pacien.gitpages.univ-eiffel.fr/markdown-course-website> 35 - Public (for students):
36 <https://pacien.gitpages.univ-eiffel.fr/markdown-course-website>
37 - Private (with exercise solutions, for the teachers):
38 <https://pacien.gitpages.univ-eiffel.fr/markdown-course-website/topsecret>
32 39
33- Source repository: 40- Source repository:
34 <https://gitlab.univ-eiffel.fr/pacien/markdown-course-website> 41 <https://gitlab.univ-eiffel.fr/pacien/markdown-course-website>