From 634e8dcdfacbc97a87a1d368dc058abe5f63adc8 Mon Sep 17 00:00:00 2001 From: Bendik Aagaard Lynghaug Date: Tue, 4 Aug 2026 20:31:58 +0200 Subject: [PATCH] Fix Ship release: site-root is project-relative, not CARGO_TARGET_DIR cp was looking for the site bundle under $CARGO_TARGET_DIR/site, but site-root = "target/site" in Cargo.toml is resolved relative to the project directory regardless of CARGO_TARGET_DIR - only the plain cargo build outputs (release/, front/) actually move when that's overridden. --- .gitea/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 42fb6f1..3c95536 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -50,7 +50,10 @@ jobs: rel="/srv/app/uhhm-portal/releases/${{ github.sha }}" mkdir -p "$rel" cp "$CARGO_TARGET_DIR/release/portal" "$rel/uhhm-portal" - cp -r "$CARGO_TARGET_DIR/site" "$rel/site" + # site-root ("target/site" in Cargo.toml) is project-relative, + # not affected by CARGO_TARGET_DIR - only the plain `cargo build` + # outputs (release/, front/) move with that override. + cp -r target/site "$rel/site" ln -sfn "$rel" /srv/app/uhhm-portal/current # Sourced from this repo's own Settings -> Actions Variables/Secrets,