Harden deployment workflow
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2026-06-07 19:18:47 +09:00
parent 2951c7ae17
commit ee91ae6503
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -36,7 +36,14 @@ jobs:
ssh-keyscan -p "$DEPLOY_PORT" "$DEPLOY_HOST" >> ~/.ssh/known_hosts ssh-keyscan -p "$DEPLOY_PORT" "$DEPLOY_HOST" >> ~/.ssh/known_hosts
ssh -i ~/.ssh/deploy_key -p "$DEPLOY_PORT" "$DEPLOY_USER@$DEPLOY_HOST" << EOF ssh \
-o BatchMode=yes \
-o ConnectTimeout=20 \
-o ServerAliveInterval=15 \
-o ServerAliveCountMax=2 \
-i ~/.ssh/deploy_key \
-p "$DEPLOY_PORT" \
"$DEPLOY_USER@$DEPLOY_HOST" << EOF
set -eu set -eu
if [ ! -d "$DEPLOY_PATH/.git" ]; then if [ ! -d "$DEPLOY_PATH/.git" ]; then
+1 -1
View File
@@ -5,7 +5,7 @@ COPY ./*.csproj ./
RUN dotnet restore RUN dotnet restore
COPY . ./ COPY . ./
RUN dotnet publish -c Release -o /app/publish --no-restore RUN dotnet publish LowLevelGuyCom.csproj -c Release -o /app/publish --no-restore
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime