From 31322261d62b97e6daf703fe8a2bd46c680641c1 Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Wed, 29 Jul 2026 15:37:32 +0200 Subject: [PATCH 1/7] feat: add zensical config and cicd workflow --- .gitea/workflows/publish-site.yml | 33 ++++++++++++++++++ zensical.toml | 56 +++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 .gitea/workflows/publish-site.yml create mode 100644 zensical.toml diff --git a/.gitea/workflows/publish-site.yml b/.gitea/workflows/publish-site.yml new file mode 100644 index 0000000..b5bea8d --- /dev/null +++ b/.gitea/workflows/publish-site.yml @@ -0,0 +1,33 @@ +name: Build and Publish Site + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + docker: + runs-on: ubuntu-latest-intranet + container: + image: gitea.psi.ch/images/alpine-zensical + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build page + run: /opt/python-env/bin/zensical build + + - name: Configure Git + run: | + git config --global user.name "Gitea Actions" + git config --global user.email "actions@gitea.local" + + - name: Push to gitea-pages branch + run: | + git checkout --orphan gitea-pages + git reset --hard + mv site/* . + git add . + git commit -m "Update site - $(date)" + git push -f https://${{ secrets.GITHUB_TOKEN }}@gitea.psi.ch/${{ github.repository }}.git gitea-pages diff --git a/zensical.toml b/zensical.toml new file mode 100644 index 0000000..7e44c89 --- /dev/null +++ b/zensical.toml @@ -0,0 +1,56 @@ +[project] +repo_url = "https://gitea.psi.ch/sls/hla_framework_bd" +edit_uri = "_edit/main/docs/" + +site_name = "SLS 2.0 High Level Applications Framework" + +site_description = """ +Documentation for SLS 2.0 High Level Applications Framework +""" + +site_author = "Paul Scherrer Institute" + +site_url = "https://sls.pages.psi.ch/hla_framework_bd/" + +copyright = """ +Copyright © 2026 Paul Scherrer Institute +""" + +language = "en" + +features = [ + "announce.dismiss", + "content.action.edit", + "content.code.annotate", + "content.code.copy", + "content.code.select", + "content.footnote.tooltips", + "content.tabs.link", + "content.tooltips", + "navigation.footer", + "navigation.indexes", + "navigation.instant", + "navigation.instant.prefetch", + "navigation.path", + "search.highlight", + "navigation.top", + "navigation.tracking", +] + +[project.theme] +# do not use google fonts +font = false + +[[project.theme.palette]] +scheme = "default" +toggle.icon = "lucide/sun" +toggle.name = "Switch to dark mode" + +[[project.theme.palette]] +scheme = "slate" +toggle.icon = "lucide/moon" +toggle.name = "Switch to light mode" + +[project.theme.icon] +logo = "simple/gitea" +repo = "simple/gitea" -- 2.54.0 From 856b0c8bb081bfde6b1ce0028f96e1f63839ea51 Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Wed, 29 Jul 2026 15:39:47 +0200 Subject: [PATCH 2/7] chore: test --- .gitea/workflows/publish-site.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/publish-site.yml b/.gitea/workflows/publish-site.yml index b5bea8d..6e06766 100644 --- a/.gitea/workflows/publish-site.yml +++ b/.gitea/workflows/publish-site.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - feature/add-gitea-pages-docs workflow_dispatch: jobs: -- 2.54.0 From 727b61e3e00f20d21d7b68114238f6d6086593d9 Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Wed, 29 Jul 2026 15:44:49 +0200 Subject: [PATCH 3/7] chore: test --- zensical.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zensical.toml b/zensical.toml index 7e44c89..f881e11 100644 --- a/zensical.toml +++ b/zensical.toml @@ -10,7 +10,7 @@ Documentation for SLS 2.0 High Level Applications Framework site_author = "Paul Scherrer Institute" -site_url = "https://sls.pages.psi.ch/hla_framework_bd/" +site_url = "https://sls.psi.ch/hla_framework_bd/" copyright = """ Copyright © 2026 Paul Scherrer Institute -- 2.54.0 From 3ca54197d1be750dba9161b6d2d1f2cdaecd4856 Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Wed, 29 Jul 2026 15:48:29 +0200 Subject: [PATCH 4/7] chore: test --- zensical.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zensical.toml b/zensical.toml index f881e11..7e44c89 100644 --- a/zensical.toml +++ b/zensical.toml @@ -10,7 +10,7 @@ Documentation for SLS 2.0 High Level Applications Framework site_author = "Paul Scherrer Institute" -site_url = "https://sls.psi.ch/hla_framework_bd/" +site_url = "https://sls.pages.psi.ch/hla_framework_bd/" copyright = """ Copyright © 2026 Paul Scherrer Institute -- 2.54.0 From 98a06e474c766e9d0f62370969291f0b3145d141 Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Wed, 29 Jul 2026 16:04:23 +0200 Subject: [PATCH 5/7] feat: add index.md --- docs/index.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/index.md diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..0d87f82 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,3 @@ +# Overview + +Documentation for the SLS 2.0 High Level Applications Framework -- 2.54.0 From 2f0c7857aa2cc134737fbd161fb3a9ab8a0f222c Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Wed, 29 Jul 2026 16:25:21 +0200 Subject: [PATCH 6/7] feat: option to have unpublished docs, only run action on changes in docs dir --- .gitea/workflows/publish-site.yml | 2 ++ docs-unpublished/README.md | 3 +++ {docs/developer => docs-unpublished}/steps.md | 0 3 files changed, 5 insertions(+) create mode 100644 docs-unpublished/README.md rename {docs/developer => docs-unpublished}/steps.md (100%) diff --git a/.gitea/workflows/publish-site.yml b/.gitea/workflows/publish-site.yml index 6e06766..7d15203 100644 --- a/.gitea/workflows/publish-site.yml +++ b/.gitea/workflows/publish-site.yml @@ -5,6 +5,8 @@ on: branches: - main - feature/add-gitea-pages-docs + paths: + - 'docs/**' workflow_dispatch: jobs: diff --git a/docs-unpublished/README.md b/docs-unpublished/README.md new file mode 100644 index 0000000..a819865 --- /dev/null +++ b/docs-unpublished/README.md @@ -0,0 +1,3 @@ +# Unpublished docs + +Any docs in this subfolder will not be published to the Gitea Pages docs. diff --git a/docs/developer/steps.md b/docs-unpublished/steps.md similarity index 100% rename from docs/developer/steps.md rename to docs-unpublished/steps.md -- 2.54.0 From 452261873933eeac3271b72fe39d08d56253e633 Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Wed, 29 Jul 2026 16:30:21 +0200 Subject: [PATCH 7/7] fix: indentation --- docs/developer/cicd_runner.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/developer/cicd_runner.md b/docs/developer/cicd_runner.md index a69e6f4..a43584d 100644 --- a/docs/developer/cicd_runner.md +++ b/docs/developer/cicd_runner.md @@ -3,16 +3,16 @@ ## Hosts - `sls-vserv-bd-01(-dev)` - - Runs shellbox commands (and `ioc install ...`?) + - Runs shellbox commands (and `ioc install ...`?) - `sls-vserv-bd-hla01(-dev)` - - Runs everything else + - Runs everything else ## Setup Resources: - - https://docs.gitea.com/usage/actions/act-runner - - https://linux.psi.ch/documentation/services/gitea/gitea-runner/ +- https://docs.gitea.com/usage/actions/act-runner +- https://linux.psi.ch/documentation/services/gitea/gitea-runner/ Register the runner: (by default the name is the machine name `sls-vserv-bd-hla01-dev.psi.ch`) ``` -- 2.54.0