Add containerized staging deployment
Validate and deploy staging / validate (push) Successful in 27s
Validate and deploy staging / deploy (push) Successful in 52s

This commit is contained in:
JB
2026-07-26 10:31:24 -04:00
parent 32e10c710b
commit 548d19d9ea
25 changed files with 1692 additions and 21 deletions
+43
View File
@@ -0,0 +1,43 @@
name: Export staging ISAC data
on:
workflow_dispatch:
concurrency:
group: shd-build-staging
cancel-in-progress: false
jobs:
export:
runs-on: stage-deploy
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Export canonical ISAC data and uploaded icons
env:
CONFIGURED_DEPLOY_PATH: ${{ vars.STAGE_DEPLOY_PATH }}
run: |
set -eu
deployment_path="${CONFIGURED_DEPLOY_PATH:-/opt/shd-build-stage}"
compose_file="$deployment_path/compose.staging.yml"
deploy_environment="$deployment_path/.env.deploy"
compose() {
docker compose --env-file "$deploy_environment" -f "$compose_file" "$@"
}
restart_services() {
compose up -d --no-build app scheduler
}
trap restart_services EXIT
snapshot_name="isac-stage-${GITHUB_RUN_ID}.json"
compose stop scheduler app
compose run --rm --no-deps app node scripts/isac-data-export.mjs "/app/data/exports/$snapshot_name"
compose run --rm --no-deps -v "$GITHUB_WORKSPACE:/export" app \
cp "/app/data/exports/$snapshot_name" /export/isac-stage.json
- name: Publish ISAC snapshot
uses: actions/upload-artifact@v3
with:
name: shd-stage-isac-data
path: isac-stage.json
retention-days: 14