diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index e4486be..2a87188 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -49,7 +49,13 @@ jobs: "APP_URL=https://${HOST}" - name: Deploy - run: flyctl deploy --app "$APP" --config fly.staging.toml --remote-only --yes + # --ha=false so Fly provisions a single machine. Staging stores sessions + # in machine-local SQLite (no shared volume), so a second machine would + # serve requests it has no session for, bouncing logged-in users back to + # the login page. scale count 1 fixes apps already created with two. + run: | + flyctl deploy --app "$APP" --config fly.staging.toml --remote-only --yes --ha=false + flyctl scale count 1 --app "$APP" --yes - name: Summary run: echo "Deployed to https://${HOST}" >> "$GITHUB_STEP_SUMMARY"