diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 4f21323..9bdb898 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -41,8 +41,11 @@ jobs: steps: - uses: actions/checkout@v4 + # SITE_NAME is read via option_env! (src/app.rs) - compile-time, + # not a runtime env var - so it has to be set here, not just in + # the "Write service env" step below. - name: Build - run: cargo leptos build --release + run: SITE_NAME=${{ vars.PORTAL_SITE_NAME }} cargo leptos build --release - name: Ship release run: | @@ -72,6 +75,11 @@ jobs: CONTENT_BRANCH=main SITE_NAME=${{ vars.PORTAL_SITE_NAME }} LEPTOS_SITE_ADDR=0.0.0.0:3010 + # Cargo.toml's site-root ("target/site") is a build-time path; + # the deploy layout copies the bundle to releases//site + # (no target/ prefix) - override so the running binary looks + # in the right place for /pkg/*. + LEPTOS_SITE_ROOT=site EOF # No sudo: the runner's own unit sets NoNewPrivileges=yes, which