From 652944146e31e2146b4dbd99057af50e39d67164 Mon Sep 17 00:00:00 2001 From: Theresa Treimer Date: Thu, 10 Jul 2025 22:47:21 +0200 Subject: [PATCH 01/11] fixed issues caused by untested PR #1 --- lapis/app.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lapis/app.lua b/lapis/app.lua index 4b0ce7f..a0251e8 100644 --- a/lapis/app.lua +++ b/lapis/app.lua @@ -19,7 +19,7 @@ app:get("/embed", function(self) if from == nil then return {"cups webring embed needs from defined (.../embed?from=me)"} end - return string.format('
', config.host, from, config.host, config.host, config.host, config.host, from, config.host), {layout = false, content_type="text/html"} + return string.format('
', config.host, from, config.host, config.host, config.host, config.host, from, config.host), {layout = false, content_type="text/html"} end) app:get("/random", function(self) @@ -39,6 +39,10 @@ app:get("/next", function(self) found = true end end + if "cups" == self.params.from then + rand = math.random(1,#members-1) + return {redirect_to=members[rand][2]} + end return {redirect_to="/"} end) @@ -55,6 +59,10 @@ app:get("/prev", function(self) found = true end end + if "cups" == self.params.from then + rand = math.random(1,#members-1) + return {redirect_to=members[rand][2]} + end return {redirect_to="/"} end) From 9dda483f789c1e50b2623523742a5e4aaa1e32c1 Mon Sep 17 00:00:00 2001 From: Theresa Treimer Date: Thu, 10 Jul 2025 22:59:23 +0200 Subject: [PATCH 02/11] deploy workflow using scp --- .forgejo/workflows/deploy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 5503cc7..7c59189 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -3,4 +3,7 @@ jobs: deploy: runs-on: docker steps: - - run: echo All Good + - uses: actions/checkout@v4 + - run: | + echo ${{secrets.SERVER_SSHKEY}} >> ../server_key + scp -i ../server_key -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring/lapis From bf3dce691bb2ed09de7bb79f4a07e3050506ad03 Mon Sep 17 00:00:00 2001 From: Theresa Treimer Date: Thu, 10 Jul 2025 23:00:49 +0200 Subject: [PATCH 03/11] deploy workflow using scp, test2 --- .forgejo/workflows/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 7c59189..bc1e74f 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -5,5 +5,5 @@ jobs: steps: - uses: actions/checkout@v4 - run: | - echo ${{secrets.SERVER_SSHKEY}} >> ../server_key - scp -i ../server_key -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring/lapis + echo ${{secrets.SERVER_SSHKEY}} >> ../server_key + scp -i ../server_key -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring/lapis From 6e78c7501e4179af4718de7a6de2298f732fee82 Mon Sep 17 00:00:00 2001 From: Theresa Treimer Date: Thu, 10 Jul 2025 23:03:23 +0200 Subject: [PATCH 04/11] deploy workflow using scp, test3 --- .forgejo/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index bc1e74f..b7e3c28 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -5,5 +5,5 @@ jobs: steps: - uses: actions/checkout@v4 - run: | - echo ${{secrets.SERVER_SSHKEY}} >> ../server_key + echo ${{secrets.SERVER_SSHKEY}} > ../server_key scp -i ../server_key -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring/lapis From 81f14004682890e6e64a4533952b6713ae4cb716 Mon Sep 17 00:00:00 2001 From: Theresa Treimer Date: Thu, 10 Jul 2025 23:09:41 +0200 Subject: [PATCH 05/11] deploy workflow using scp, test4 --- .forgejo/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index b7e3c28..9f310b6 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -5,5 +5,5 @@ jobs: steps: - uses: actions/checkout@v4 - run: | - echo ${{secrets.SERVER_SSHKEY}} > ../server_key + echo "${{secrets.SERVER_SSHKEY}}" > ../server_key scp -i ../server_key -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring/lapis From dffc1bb9d47b4bb6c4bcd2f6cd64b31b6de86797 Mon Sep 17 00:00:00 2001 From: Theresa Treimer Date: Thu, 10 Jul 2025 23:45:23 +0200 Subject: [PATCH 06/11] deploy workflow using scp, test5 --- .forgejo/workflows/deploy.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 9f310b6..538b569 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -5,5 +5,7 @@ jobs: steps: - uses: actions/checkout@v4 - run: | - echo "${{secrets.SERVER_SSHKEY}}" > ../server_key + echo "${{secrets.SERVER_SSHKEY}}" > ../server_key && + chmod 700 ../server_key && + echo "${{secrets.SERVER_SSHKEYSCAN}}" > ~/.ssh/known_hosts && scp -i ../server_key -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring/lapis From 2f6888aeedd5715e00e055d7a06fdd7ebfa4684f Mon Sep 17 00:00:00 2001 From: Theresa Treimer Date: Thu, 10 Jul 2025 23:47:54 +0200 Subject: [PATCH 07/11] deploy workflow using scp, test6 --- .forgejo/workflows/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 538b569..2a2ce5f 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -7,5 +7,5 @@ jobs: - run: | echo "${{secrets.SERVER_SSHKEY}}" > ../server_key && chmod 700 ../server_key && - echo "${{secrets.SERVER_SSHKEYSCAN}}" > ~/.ssh/known_hosts && - scp -i ../server_key -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring/lapis + echo "${{secrets.SERVER_SSHKEYSCAN}}" > ../known_hosts && + scp -i ../server_key -o UserKnownHostsFile=../known_hosts -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring/lapis From c4373b73cfe84ac8042d70bfbc03b202a2574598 Mon Sep 17 00:00:00 2001 From: Theresa Treimer Date: Thu, 10 Jul 2025 23:54:19 +0200 Subject: [PATCH 08/11] deploy workflow using scp, test7, should work now --- .forgejo/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 2a2ce5f..01a4f9c 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -8,4 +8,4 @@ jobs: echo "${{secrets.SERVER_SSHKEY}}" > ../server_key && chmod 700 ../server_key && echo "${{secrets.SERVER_SSHKEYSCAN}}" > ../known_hosts && - scp -i ../server_key -o UserKnownHostsFile=../known_hosts -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring/lapis + scp -i ../server_key -o UserKnownHostsFile=../known_hosts -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring From d895bccb178d1d1f10464861294d17aa108ebcee Mon Sep 17 00:00:00 2001 From: Theresa Date: Sat, 12 Jul 2025 17:58:47 +0200 Subject: [PATCH 09/11] added myself to webring --- lapis/app.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lapis/app.lua b/lapis/app.lua index a0251e8..d5aff0e 100644 --- a/lapis/app.lua +++ b/lapis/app.lua @@ -5,7 +5,8 @@ local config = require("lapis.config").get() members = {{"fynn","https://fynngodau.de"}, {"anton","https://anton.ehrmanntraut.de"}, - {"max","https://aaahhh.de"}} + {"max","https://aaahhh.de"}, + {"theresa","https://treimer.dev"}} members[#members+1] = members[1] math.randomseed(os.time()) From 542a2ce25ca8187a4558ab27241f80b2a4233b1a Mon Sep 17 00:00:00 2001 From: Theresa Date: Mon, 14 Jul 2025 19:55:36 +0200 Subject: [PATCH 10/11] added never to webring --- lapis/app.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lapis/app.lua b/lapis/app.lua index d5aff0e..72413d0 100644 --- a/lapis/app.lua +++ b/lapis/app.lua @@ -6,7 +6,8 @@ local config = require("lapis.config").get() members = {{"fynn","https://fynngodau.de"}, {"anton","https://anton.ehrmanntraut.de"}, {"max","https://aaahhh.de"}, - {"theresa","https://treimer.dev"}} + {"theresa","https://treimer.dev"}, + {"never","https://nevereverever.de"}} members[#members+1] = members[1] math.randomseed(os.time()) From ae03c8a3bdeb4a30addca77fd4539fa197748908 Mon Sep 17 00:00:00 2001 From: Fynn Godau Date: Thu, 17 Jul 2025 13:08:47 +0200 Subject: [PATCH 11/11] Add alt text to embed --- lapis/app.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lapis/app.lua b/lapis/app.lua index 72413d0..2de0c3c 100644 --- a/lapis/app.lua +++ b/lapis/app.lua @@ -21,7 +21,7 @@ app:get("/embed", function(self) if from == nil then return {"cups webring embed needs from defined (.../embed?from=me)"} end - return string.format('
', config.host, from, config.host, config.host, config.host, config.host, from, config.host), {layout = false, content_type="text/html"} + return string.format('
PreviousCUPSNext
', config.host, from, config.host, config.host, config.host, config.host, from, config.host), {layout = false, content_type="text/html"} end) app:get("/random", function(self)