Skip to content

commit

commit #33

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: deploy
cancel-in-progress: true
jobs:
deploy-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.8"
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Deploy Convex
run: bunx convex deploy
working-directory: packages/backend
env:
CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY }}
deploy-frontend:
runs-on: ubuntu-latest
needs: deploy-backend
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.8"
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build SPA
run: bun run --cwd apps/web build
env:
VITE_CONVEX_URL: ${{ secrets.VITE_CONVEX_URL }}
VITE_CONVEX_SITE_URL: ${{ secrets.VITE_CONVEX_SITE_URL }}
VITE_ELEVENLABS_AGENT_ID: ${{ secrets.VITE_ELEVENLABS_AGENT_ID }}
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Copy shell as index.html
run: cp apps/web/.output/public/_shell.html apps/web/.output/public/index.html
- name: Deploy to S3
run: |
aws s3 sync apps/web/.output/public/ s3://mistral-hackaton-office \
--delete \
--cache-control "public, max-age=31536000, immutable" \
--exclude "*.html"
# HTML files get short cache (for updates)
aws s3 sync apps/web/.output/public/ s3://mistral-hackaton-office \
--delete \
--cache-control "public, max-age=60" \
--exclude "*" \
--include "*.html"
echo "Deployed to http://mistral-hackaton-office.s3-website-us-west-2.amazonaws.com"