From ee77a288193038ade8b6ad8228507c52dea02220 Mon Sep 17 00:00:00 2001 From: zimoch Date: Fri, 26 Jun 2026 11:38:37 +0200 Subject: [PATCH] Make repo fork-save If this repo is forked, push the rendered pages to the forked repo, not to the original. Also make sure the rendered gitea link points to the forked repo. --- .gitea/workflows/deploy-pages.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-pages.yml b/.gitea/workflows/deploy-pages.yml index b764f26c..50428b52 100644 --- a/.gitea/workflows/deploy-pages.yml +++ b/.gitea/workflows/deploy-pages.yml @@ -16,7 +16,9 @@ jobs: uses: actions/checkout@v4 - name: Build page - run: /opt/python-env/bin/zensical build + run: | + sed -i 's|repo_url[[:space:]]*=[[:space:]]*".*"|repo_url = "${{ github.server_url }}/${{ github.repository }}"|' zensical.toml + /opt/python-env/bin/zensical build - name: Configure Git run: | @@ -30,5 +32,6 @@ jobs: mv site/* . git add . git commit -m "Update site - $(date)" - git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/Controls/gitea-pages.git gitea-pages + REPO_URL=$(echo "${{ github.server_url }}/${{ github.repository }}.git" | sed 's|https://||') + git push -f https://${{ secrets.GITHUB_TOKEN }}@$REPO_URL gitea-pages -- 2.52.0