Error handling for card saves, including WAF rejections #7417
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI [boxel-host] | |
on: | |
pull_request: | |
paths: | |
- "packages/host/**" | |
- "packages/boxel-ui/**" | |
- "packages/boxel-icons/**" | |
- ".github/workflows/pr-boxel-host.yml" | |
- "package.json" | |
- "pnpm-lock.yaml" | |
permissions: | |
contents: read | |
issues: read | |
checks: write | |
pull-requests: write | |
id-token: write | |
statuses: write | |
jobs: | |
check-if-requires-preview: | |
name: Check if a preview deploy is required | |
runs-on: ubuntu-latest | |
outputs: | |
boxel-host-files-changed: ${{ steps.boxel-host-files-that-changed.outputs.any_changed }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get boxel-host files that changed | |
id: boxel-host-files-that-changed | |
uses: tj-actions/changed-files@v39 | |
with: | |
files: | | |
.github/workflows/build-host.yml | |
.github/workflows/deploy-host.yml | |
.github/workflows/pr-boxel-host.yml | |
packages/host/** | |
packages/boxel-ui/** | |
packages/boxel-icons/** | |
deploy-host-preview-staging: | |
name: Deploy a boxel-host staging preview to S3 | |
runs-on: ubuntu-latest | |
# github.event.pull_request.head.repo.full_name == github.repository: true if pr is from the original repo, false if it's from a fork | |
# github.head_ref: the branch that the pull request is from. only appears on pull_request events | |
if: github.event.pull_request.head.repo.full_name == github.repository && github.head_ref && needs.check-if-requires-preview.outputs.boxel-host-files-changed == 'true' | |
needs: check-if-requires-preview | |
concurrency: deploy-host-preview-staging | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::680542703984:role/boxel-host | |
aws-region: us-east-1 | |
- name: Deploy boxel-host preview | |
uses: ./.github/actions/deploy-ember-preview | |
env: | |
OWN_REALM_URL: https://realms-staging.stack.cards/experiments/ | |
RESOLVED_BASE_REALM_URL: https://realms-staging.stack.cards/base/ | |
MATRIX_URL: https://matrix-staging.stack.cards | |
MATRIX_SERVER_NAME: stack.cards | |
EXPERIMENTAL_AI_ENABLED: true | |
STRIPE_PAYMENT_LINK: https://buy.stripe.com/test_9AQdUjgaDePb8lWcMN | |
S3_PREVIEW_BUCKET_NAME: boxel-host-preview.stack.cards | |
AWS_S3_BUCKET: boxel-host-preview.stack.cards | |
AWS_REGION: us-east-1 | |
AWS_CLOUDFRONT_DISTRIBUTION: EU4RGLH4EOCHJ | |
with: | |
package: boxel-host | |
environment: staging | |
deploy-host-preview-production: | |
name: Deploy a boxel-host production preview to S3 | |
runs-on: ubuntu-latest | |
# github.event.pull_request.head.repo.full_name == github.repository: true if pr is from the original repo, false if it's from a fork | |
# github.head_ref: the branch that the pull request is from. only appears on pull_request events | |
if: github.event.pull_request.head.repo.full_name == github.repository && github.head_ref && needs.check-if-requires-preview.outputs.boxel-host-files-changed == 'true' | |
needs: check-if-requires-preview | |
concurrency: deploy-host-preview-production | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::120317779495:role/boxel-host | |
aws-region: us-east-1 | |
- name: Deploy boxel-host preview | |
uses: ./.github/actions/deploy-ember-preview | |
env: | |
OWN_REALM_URL: https://app.boxel.ai/experiments/ | |
RESOLVED_BASE_REALM_URL: https://app.boxel.ai/base/ | |
MATRIX_URL: https://matrix.boxel.ai | |
MATRIX_SERVER_NAME: boxel.ai | |
EXPERIMENTAL_AI_ENABLED: true | |
STRIPE_PAYMENT_LINK: https://buy.stripe.com/00g29k8zLgI35xK000 | |
S3_PREVIEW_BUCKET_NAME: boxel-host-preview.boxel.ai | |
AWS_S3_BUCKET: boxel-host-preview.boxel.ai | |
AWS_REGION: us-east-1 | |
AWS_CLOUDFRONT_DISTRIBUTION: E2PZR9CIAW093B | |
with: | |
package: boxel-host | |
environment: production |