diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 843e0e9..8975471 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -15,6 +15,11 @@ jobs: CARGO_HOME: /var/local/cargo RUSTUP_HOME: /var/local/rustup PATH: /var/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin + # Shared with interactive dev builds (see ~/.config/fish/config.fish) + # so a crate compiled once, by either a manual build or CI, is + # cached for the other - real cache hits, not just a warm toolchain. + SCCACHE_DIR: /var/local/sccache + CARGO_TARGET_DIR: /var/local/cargo-target steps: - uses: actions/checkout@v4 @@ -26,8 +31,8 @@ jobs: set -euo pipefail rel="/srv/app/uhhm-portal/releases/${{ github.sha }}" mkdir -p "$rel" - cp target/release/portal "$rel/uhhm-portal" - cp -r target/site "$rel/site" + cp "$CARGO_TARGET_DIR/release/portal" "$rel/uhhm-portal" + cp -r "$CARGO_TARGET_DIR/site" "$rel/site" ln -sfn "$rel" /srv/app/uhhm-portal/current # Sourced from this repo's own Settings -> Actions Variables/Secrets,