From a8ddefd18aa2b7985e4b61f2cac608798fe3406d Mon Sep 17 00:00:00 2001 From: Fadhlan Ridhwanallah Date: Tue, 23 Jun 2026 15:24:26 +0700 Subject: [PATCH] Sync Synapse custom modules to staging/prod via the asset sync workflow Extend the Synapse template-sync workflow to also ship the custom Python modules under packages/matrix/support/synapse/modules (the OIDC user_mapping_provider) to S3, so staging/prod Synapse can import them. - Rename sync-synapse-templates.yml -> sync-synapse-assets.yml (no longer template-only). - Trigger on changes under modules/** in addition to templates/**. - Add a second `aws s3 sync` pushing modules -> s3://$BUCKET/modules, excluding test files. The existing force-new-deployment step already restarts Synapse and picks up both synced directories. Co-Authored-By: Claude Opus 4.8 (1M context) --- ...-synapse-templates.yml => sync-synapse-assets.yml} | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) rename .github/workflows/{sync-synapse-templates.yml => sync-synapse-assets.yml} (88%) diff --git a/.github/workflows/sync-synapse-templates.yml b/.github/workflows/sync-synapse-assets.yml similarity index 88% rename from .github/workflows/sync-synapse-templates.yml rename to .github/workflows/sync-synapse-assets.yml index a1c9076a984..cf2b89d05c7 100644 --- a/.github/workflows/sync-synapse-templates.yml +++ b/.github/workflows/sync-synapse-assets.yml @@ -1,10 +1,11 @@ -name: Sync Matrix Synapse Email Templates +name: Sync Matrix Synapse Assets on: push: branches: [main] paths: - "packages/matrix/support/synapse/templates/**" + - "packages/matrix/support/synapse/modules/**" workflow_dispatch: inputs: environment: @@ -20,7 +21,7 @@ jobs: sync: name: sync runs-on: ubuntu-latest - concurrency: sync-synapse-templates-${{ inputs.environment || 'staging' }} + concurrency: sync-synapse-assets-${{ inputs.environment || 'staging' }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -62,10 +63,14 @@ jobs: run: | sed -i "s/d12nxmpmo97fii.cloudfront.net\/boxel-icon.png/${{ env.BOXEL_ICON_DOMAIN_AND_PATH }}/" packages/matrix/support/synapse/templates/_base.html - - name: S3 Sync + - name: S3 Sync templates run: | aws s3 sync packages/matrix/support/synapse/templates s3://${{ env.AWS_S3_BUCKET }}/templates + - name: S3 Sync modules + run: | + aws s3 sync packages/matrix/support/synapse/modules s3://${{ env.AWS_S3_BUCKET }}/modules --exclude "test_*" + - name: Restart Synapse ECS Service run: | aws ecs update-service --cluster ${{ env.AWS_ECS_CLUSTER }} --service ${{ env.AWS_ECS_SERVICE }} --force-new-deployment