Skip to content

Merge pull request #264 from meetnearme/fix/cloudflare-kv-env-vars-2 #195

Merge pull request #264 from meetnearme/fix/cloudflare-kv-env-vars-2

Merge pull request #264 from meetnearme/fix/cloudflare-kv-env-vars-2 #195

Workflow file for this run

name: Deploy Dev (SST)
on:
push:
branches:
- develop
# Concurrency group name ensures concurrent workflow runs wait for any in-progress job to finish
concurrency:
group: merge-${{ github.ref }}
permissions:
id-token: write # This is required for requesting the JWT
contents: write # This is required for actions/checkout
pull-requests: write # This is required for comitting templ generated code
jobs:
DeployDevSST:
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
- name: npm install
run: |
npm i
- name: Generate Tailwind CSS
# 🚨 Must come before `templ_generate` to ensure CSS hash in
# layout.templ is updated first, before go templates compile
run: |
npm run tailwind:prod
- name: Generate templ code
uses: './.github/actions/templ_generate'
with:
templ-version: 'v0.2.793'
setup-go: 'false'
commit: 'false'
- name: Breakpoint if `templ` generate failed
if: failure()
uses: namespacelabs/breakpoint-action@v0
with:
duration: 30m
authorized-users: brianfeister
- name: Configure AWS & Create env file
uses: './.github/actions/set_aws_creds_env_vars'
with:
APEX_URL: ${{ secrets.APEX_DEV_URL }}
APEX_DEV_URL: ${{ secrets.APEX_DEV_URL }}
SCRAPINGBEE_API_KEY: ${{ secrets.SCRAPINGBEE_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_BASE_URL: ${{ secrets.OPENAI_API_BASE_URL }}
ZITADEL_CLIENT_ID: ${{ secrets.ZITADEL_CLIENT_ID }}
ZITADEL_CLIENT_SECRET: ${{ secrets.ZITADEL_CLIENT_SECRET }}
ZITADEL_PROJECT_ID: ${{ secrets.ZITADEL_PROJECT_ID }}
ZITADEL_ENCRYPTION_KEY: ${{ secrets.ZITADEL_ENCRYPTION_KEY }}
ZITADEL_INSTANCE_HOST: ${{ secrets.ZITADEL_INSTANCE_HOST }}
ZITADEL_BOT_ADMIN_TOKEN: ${{ secrets.ZITADEL_BOT_ADMIN_TOKEN }}
MARQO_API_KEY: ${{ secrets.MARQO_API_KEY }}
PROD_MARQO_API_BASE_URL: ${{ secrets.PROD_MARQO_API_BASE_URL }}
DEV_MARQO_API_BASE_URL: ${{ secrets.DEV_MARQO_API_BASE_URL }}
PROD_MARQO_INDEX_NAME: ${{ secrets.PROD_MARQO_INDEX_NAME }}
DEV_MARQO_INDEX_NAME: ${{ secrets.DEV_MARQO_INDEX_NAME }}
PROD_STRIPE_SECRET_KEY: ${{ secrets.PROD_STRIPE_SECRET_KEY }}
PROD_STRIPE_PUBLISHABLE_KEY:
${{ secrets.PROD_STRIPE_PUBLISHABLE_KEY }}
DEV_STRIPE_SECRET_KEY: ${{ secrets.DEV_STRIPE_SECRET_KEY }}
DEV_STRIPE_PUBLISHABLE_KEY: ${{ secrets.DEV_STRIPE_PUBLISHABLE_KEY }}
DEV_STRIPE_CHECKOUT_WEBHOOK_SECRET: ${{ secrets.DEV_STRIPE_CHECKOUT_WEBHOOK_SECRET }}
PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET: ${{ secrets.PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET }}
CLOUDFLARE_API_BASE_URL: ${{ secrets.CLOUDFLARE_API_BASE_URL }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_NAMESPACE_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE: ${{ secrets.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE }}
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID }}
- name: Generate Cloudflare locations Go file
uses: './.github/actions/generate_cloudflare_locations_file'
- name: Deploy AWS resources via SST
run: |
npm i && npx sst deploy --stage dev
- name: Breakpoint if `npx sst deploy` failed
if: failure()
uses: namespacelabs/breakpoint-action@v0
with:
duration: 30m
authorized-users: brianfeister