Fix Ship release: site-root is project-relative, not CARGO_TARGET_DIR
Deploy / deploy (push) Failing after 26s
Deploy / deploy (push) Failing after 26s
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.
This commit is contained in:
@@ -50,7 +50,10 @@ jobs:
|
|||||||
rel="/srv/app/uhhm-portal/releases/${{ github.sha }}"
|
rel="/srv/app/uhhm-portal/releases/${{ github.sha }}"
|
||||||
mkdir -p "$rel"
|
mkdir -p "$rel"
|
||||||
cp "$CARGO_TARGET_DIR/release/portal" "$rel/uhhm-portal"
|
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
|
ln -sfn "$rel" /srv/app/uhhm-portal/current
|
||||||
|
|
||||||
# Sourced from this repo's own Settings -> Actions Variables/Secrets,
|
# Sourced from this repo's own Settings -> Actions Variables/Secrets,
|
||||||
|
|||||||
Reference in New Issue
Block a user