Merge pull request #215 from meetnearme/develop #108
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: Deploy Prod (SST) | |
on: | |
push: | |
branches: | |
- main | |
# 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: read # This is required for actions/checkout | |
jobs: | |
DeployProdSST: | |
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.21.x' | |
- name: Generate templ code | |
uses: './.github/actions/templ_generate' | |
with: | |
templ-version: 'v0.2.747' | |
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_URL }} | |
APEX_DEV_URL: ${{ secrets.APEX_DEV_URL }} | |
SCRAPINGBEE_API_KEY: ${{ secrets.SCRAPINGBEE_API_KEY }} | |
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
OPENAI_API_BASE_URL: ${{ secrets.OPENAI_API_BASE_URL }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
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 }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
CLOUDFLARE_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_NAMESPACE_ID }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_API_BASE_URL: ${{ secrets.CLOUDFLARE_API_BASE_URL }} | |
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 }} | |
- 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 prod |