43 lines
1.6 KiB
YAML
43 lines
1.6 KiB
YAML
name: Deploy Staging
|
|
|
|
# Continuous deployment to the LOCAL staging stack. Fires when develop advances
|
|
# (i.e. after a PR is merged into develop). It re-verifies the code, then rebuilds
|
|
# and restarts the isolated staging stack on this machine.
|
|
#
|
|
# CRITICAL: staging lives on your Windows box (ports 18080/18081). A cloud or
|
|
# container runner CANNOT reach it, so this job MUST run on a self-hosted Gitea
|
|
# Actions runner registered ON that Windows machine with Docker access
|
|
# (labels: self-hosted, windows). Until that runner exists this job just waits
|
|
# in the queue (harmless, cancelable) — deploy staging manually meanwhile with:
|
|
# ./deploy/up.ps1 -Staging
|
|
on:
|
|
push:
|
|
branches: [develop]
|
|
workflow_dispatch: {} # also allow a manual "Run workflow" from the Gitea UI
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: [self-hosted, windows]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# Re-run the gate on the exact merged code before it touches staging.
|
|
- name: Build + test (Release)
|
|
shell: powershell
|
|
run: |
|
|
dotnet build InboxIntel.sln -c Release --nologo
|
|
dotnet test InboxIntel.sln -c Release --no-build --nologo
|
|
|
|
- name: Redeploy staging stack
|
|
shell: powershell
|
|
run: |
|
|
docker compose -p inboxintel-staging `
|
|
--env-file deploy/.env.staging `
|
|
-f docker-compose.yml -f docker-compose.staging.yml `
|
|
up -d --build
|
|
docker compose -p inboxintel-staging ps
|
|
|
|
- name: Staging endpoints
|
|
shell: powershell
|
|
run: Write-Host "Staging up — Frontend http://localhost:18081 API http://localhost:18080/swagger"
|