From 31322261d62b97e6daf703fe8a2bd46c680641c1 Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Wed, 29 Jul 2026 15:37:32 +0200 Subject: [PATCH] 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"