Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions .github/templates/preview-comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
<td>$DATABASE_LINK</td>
</tr>
<tr>
<td><img src="https://fly.io/phx/ui/images/favicon/favicon-595d1312b35dfe32838befdf8505515e.ico" width="20" height="20" alt="Fly.io"> <strong>Electric (Fly.io)</strong></td>
<td align="center">$ELECTRIC_STATUS</td>
<td>$ELECTRIC_LINK</td>
</tr>
<tr>
<td><img src="https://vercel.com/favicon.ico" width="20" height="20" alt="Vercel"> <strong>API (Vercel)</strong></td>
<td align="center">$API_STATUS</td>
<td>$API_LINK</td>
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/cleanup-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ jobs:
branch: ${{ github.event.pull_request.head.ref }}
api_key: ${{ secrets.NEON_API_KEY }}

- name: Setup Fly CLI
uses: superfly/flyctl-actions/setup-flyctl@ed8efb33836e8b2096c7fd3ba1c8afe303ebbff1 # 1.6

- name: Delete Electric Fly.io app
id: electric-cleanup
continue-on-error: true
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: |
flyctl apps destroy "superset-electric-pr-${{ github.event.pull_request.number }}" --yes

- name: Update comment
if: always()
uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
Expand All @@ -42,7 +31,6 @@ jobs:

The following preview resources have been cleaned up:
- ${{ steps.neon-cleanup.outcome == 'success' && '✅' || '⚠️' }} Neon database branch
- ${{ steps.electric-cleanup.outcome == 'success' && '✅' || '⚠️' }} Electric Fly.io app

Thank you for your contribution! 🎉
comment-tag: "🚀-preview-deployment"
60 changes: 4 additions & 56 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ env:
MARKETING_ALIAS: marketing-pr-${{ github.event.pull_request.number }}-superset.vercel.app
ADMIN_ALIAS: admin-pr-${{ github.event.pull_request.number }}-superset.vercel.app
DOCS_ALIAS: docs-pr-${{ github.event.pull_request.number }}-superset.vercel.app
ELECTRIC_URL: https://superset-electric-pr-${{ github.event.pull_request.number }}.fly.dev/v1/shape

jobs:
deploy-database:
Expand Down Expand Up @@ -78,51 +77,6 @@ jobs:
name: database-status
path: database-status.env

deploy-electric:
name: Deploy Electric (Fly.io)
runs-on: ubuntu-latest
needs: deploy-database

steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Download database info
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: database-status

- name: Load database URL
run: |
source database-status.env
echo "DATABASE_URL_UNPOOLED=$DATABASE_URL_UNPOOLED" >> $GITHUB_ENV

- name: Deploy Electric to Fly.io
uses: superfly/fly-pr-review-apps@f7152c133b1fe7767b6e549ca09598655c1f8ca4 # 1.3.0
with:
name: superset-electric-pr-${{ github.event.pull_request.number }}
region: iad
org: ${{ vars.FLY_ORG }}
config: fly.toml
secrets: |
DATABASE_URL=${{ env.DATABASE_URL_UNPOOLED }}
ELECTRIC_SECRET=${{ secrets.ELECTRIC_SECRET_PREVIEW }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

- name: Save Electric status
run: |
cat > electric-status.env << EOF
ELECTRIC_STATUS="✅"
ELECTRIC_LINK="<a href=\"https://fly.io/apps/superset-electric-pr-${{ github.event.pull_request.number }}\">View App</a>"
EOF

- name: Upload Electric status
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: electric-status
path: electric-status.env

deploy-api:
name: Deploy API
runs-on: ubuntu-latest
Expand Down Expand Up @@ -206,8 +160,8 @@ jobs:
QSTASH_URL: ${{ secrets.QSTASH_URL }}
QSTASH_CURRENT_SIGNING_KEY: ${{ secrets.QSTASH_CURRENT_SIGNING_KEY }}
QSTASH_NEXT_SIGNING_KEY: ${{ secrets.QSTASH_NEXT_SIGNING_KEY }}
ELECTRIC_URL: ${{ env.ELECTRIC_URL }}
ELECTRIC_SECRET: ${{ secrets.ELECTRIC_SECRET_PREVIEW }}
ELECTRIC_URL: ${{ secrets.ELECTRIC_URL }}
ELECTRIC_SECRET: ${{ secrets.ELECTRIC_SECRET }}
DURABLE_STREAMS_URL: ${{ secrets.DURABLE_STREAMS_URL }}
DURABLE_STREAMS_SECRET: ${{ secrets.DURABLE_STREAMS_SECRET }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
Expand Down Expand Up @@ -727,7 +681,7 @@ jobs:
name: Post Deployment Comment
runs-on: ubuntu-latest
if: always()
needs: [deploy-database, deploy-electric, deploy-api, deploy-web, deploy-marketing, deploy-admin, deploy-docs]
needs: [deploy-database, deploy-api, deploy-web, deploy-marketing, deploy-admin, deploy-docs]
permissions:
contents: read
pull-requests: write
Expand All @@ -746,8 +700,6 @@ jobs:
run: |
DATABASE_STATUS="❌"
DATABASE_LINK="Failed to create"
ELECTRIC_STATUS="❌"
ELECTRIC_LINK="Failed to deploy"
API_STATUS="❌"
API_LINK="Failed to deploy"
WEB_STATUS="❌"
Expand All @@ -763,10 +715,6 @@ jobs:
source database-status.env
fi

if [[ "${{ needs.deploy-electric.result }}" == "success" ]]; then
source electric-status.env
fi

if [[ "${{ needs.deploy-api.result }}" == "success" ]]; then
source api-status.env
fi
Expand All @@ -787,7 +735,7 @@ jobs:
source docs-status.env
fi

export DATABASE_STATUS DATABASE_LINK ELECTRIC_STATUS ELECTRIC_LINK API_STATUS API_LINK WEB_STATUS WEB_LINK MARKETING_STATUS MARKETING_LINK ADMIN_STATUS ADMIN_LINK DOCS_STATUS DOCS_LINK
export DATABASE_STATUS DATABASE_LINK API_STATUS API_LINK WEB_STATUS WEB_LINK MARKETING_STATUS MARKETING_LINK ADMIN_STATUS ADMIN_LINK DOCS_STATUS DOCS_LINK
envsubst < .github/templates/preview-comment.md > final-comment.md

- name: Post final deployment comment
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -446,33 +446,6 @@ jobs:
--env SECRETS_ENCRYPTION_KEY=$SECRETS_ENCRYPTION_KEY \
--env ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY

deploy-electric:
name: Deploy Electric to Fly.io
runs-on: ubuntu-latest
environment: production

steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Setup Fly CLI
uses: superfly/flyctl-actions/setup-flyctl@ed8efb33836e8b2096c7fd3ba1c8afe303ebbff1 # 1.6

- name: Stage secrets
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: |
flyctl secrets set \
DATABASE_URL="${{ secrets.DATABASE_URL_UNPOOLED }}" \
ELECTRIC_SECRET="${{ secrets.ELECTRIC_SECRET }}" \
--app superset-electric \
--stage

- name: Deploy to Fly.io
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: flyctl deploy . --config fly.toml --remote-only

deploy-electric-proxy:
name: Deploy Electric Proxy to Cloudflare
runs-on: ubuntu-latest
Expand Down
32 changes: 0 additions & 32 deletions fly.toml

This file was deleted.

Loading