Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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/**"
Comment on lines 6 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include workflow edits in the push paths

When this PR lands by itself, the push.paths filter is evaluated against the files changed by that push; GitHub's workflow syntax docs state, “If at least one path matches,” the workflow runs. This commit only renames/edits .github/workflows/sync-synapse-assets.yml, so neither listed path matches and the promised automatic staging sync/restart will not happen; the module added earlier remains absent from S3 until someone manually dispatches the workflow or a later templates/modules change occurs. Include the workflow file in the path filter for this bootstrap case or otherwise make the initial sync explicit.

Useful? React with 👍 / 👎.

workflow_dispatch:
inputs:
environment:
Expand All @@ -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

Expand Down Expand Up @@ -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