Skip to content

Test (#195)

Test (#195) #5

---
name: Deploy to Production
# yamllint disable-line rule:truthy
on:
push:
branches:
- prod
workflow_dispatch:
concurrency:
group: deploy-production-${{ github.head_ref || github.ref }}
cancel-in-progress: false
jobs:
deploy-sst:
name: 🚀 Deploy to production with SST
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
- name: 🏗️ Setup PNPM
uses: ./.github/actions/setup-app
with:
cache-build: true
cache-opennext: true
- name: 🚀 Deploy to production with SST
run: |
pnpm dlx sst deploy --stage production
env:
# General build settings
CI: true
NODE_ENV: production
TURBO: 1 # Use turbopack for faster builds
# AWS
AWS_REGION: "eu-west-2"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# Cloudflare
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_DEFAULT_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_DEFAULT_ACCOUNT_ID }}
# Tomorrow.io
WEATHER_API_KEY: ${{ secrets.WEATHER_API_KEY }}
# Sentry
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# Posthog
NEXT_PUBLIC_POSTHOG_KEY: ${{ secrets.NEXT_PUBLIC_POSTHOG_KEY }}
NEXT_PUBLIC_POSTHOG_HOST: ${{ secrets.NEXT_PUBLIC_POSTHOG_HOST }}