Skip to content

Merge pull request #1266 from andrew-bierman/feat/item-score-observer #469

Merge pull request #1266 from andrew-bierman/feat/item-score-observer

Merge pull request #1266 from andrew-bierman/feat/item-score-observer #469

Workflow file for this run

name: 'Backend Production Deployment'
on:
workflow_dispatch:
push:
branches:
- main
- andrew_testing
paths:
- '.github/workflows/backend.yml'
- 'packages/validations/**'
- 'packages/shared-types/**'
- 'server/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
name: Deploy to Cloudflare Workers
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup JS Runtime environment
uses: ./.github/actions/setup-js-runtime
- name: Generate wrangler.toml
uses: ./.github/actions/setup-wrangler-toml
with:
environment: production
APP_URL: ${{ secrets.APP_URL }}
AWS_SIGN_ALGORITHM: ${{ secrets.AWS_SIGN_ALGORITHM }}
BUCKET_ENDPOINT: ${{ secrets.BUCKET_ENDPOINT }}
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
BUCKET_REGION: ${{ secrets.BUCKET_REGION }}
BUCKET_SERVICE: ${{ secrets.BUCKET_SERVICE }}
BUCKET_SESSION_TOKEN: ${{ secrets.BUCKET_SESSION_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
DB_ID: ${{ secrets.PRODUCTION_DB_ID }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
STMP_EMAIL: ${{ secrets.STMP_EMAIL }}
VECTOR_INDEX_NAME: ${{ secrets.VECTOR_INDEX }}
- name: Migrate database
uses: ./.github/actions/migrate-d1-database
with:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_ENVIRONMENT: production
- name: Deploy
uses: ./.github/actions/deploy-cloudflare-worker
with:
BUCKET_ACCESS_KEY_ID: ${{ secrets.BUCKET_ACCESS_KEY_ID }}
BUCKET_SECRET_KEY: ${{ secrets.BUCKET_SECRET_KEY }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_ENVIRONMENT: production
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
JWT_VERIFICATION_KEY: ${{ secrets.JWT_SECRET }}
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENWEATHER_KEY: ${{ secrets.OPENWEATHER_KEY }}
REFRESH_TOKEN_SECRET: ${{ secrets.REFRESH_TOKEN_SECRET }}
SEND_GRID_API_KEY: ${{ secrets.SEND_GRID_API_KEY }}
STMP_PASSWORD: ${{ secrets.STMP_PASSWORD }}
VECTORIZE_API_KEY: ${{ secrets.VECTORIZE_API_KEY }}
WORKERS_AI_API_KEY: ${{ secrets.WORKERS_AI_API_KEY }}
X_AMZ_SECURITY_TOKEN: ${{ secrets.X_AMZ_SECURITY_TOKEN }}