add debugging steps to CSS hashing / generation #897
Workflow file for this run
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 Feature Branch (SST) | |
on: | |
push: | |
branches: | |
- feature/* | |
# 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: | |
DeployFeatureSST: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git clone the repository | |
uses: actions/checkout@v4 | |
- name: Extract branch name | |
shell: bash | |
# sed 's|/|-|g' replaces all slashes with hyphens, aws stack names can't have slashes | |
run: | | |
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | sed 's|/|-|g' >> $GITHUB_OUTPUT | |
id: extract_branch | |
- 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_DEV_URL }} | |
APEX_DEV_URL: ${{ secrets.APEX_DEV_URL }} | |
SCRAPINGBEE_API_KEY: ${{ secrets.SCRAPINGBEE_API_KEY }} | |
GIT_BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }} | |
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 }} | |
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 }} | |
# Not set because this is dynamic in lower environments | |
# APEX_URL: ${{ secrets.APEX_URL }} | |
- name: Generate Cloudflare locations Go file | |
uses: './.github/actions/generate_cloudflare_locations_file' | |
- name: Generate Tailwind CSS | |
run: | | |
npm run tailwind:prod | |
# TODO: below is a debug step, DO NOT MERGE to `development` branch | |
- name: Breakpoint to check if Tailwind CSS generation failed | |
uses: namespacelabs/breakpoint-action@v0 | |
with: | |
duration: 30m | |
authorized-users: brianfeister | |
- name: Deploy AWS resources via SST | |
run: | | |
npm i && npx sst deploy --stage ${{ steps.extract_branch.outputs.branch }} | |
- name: Deploy to Cloudflare Workers with Wrangler | |
uses: cloudflare/wrangler-action@v3.7.0 | |
env: | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
CLOUDFLARE_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_NAMESPACE_ID }} | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |