Skip to content

feat: complete V2 plan — security, GDPR, Redis cache, k8s, code split… #10

feat: complete V2 plan — security, GDPR, Redis cache, k8s, code split…

feat: complete V2 plan — security, GDPR, Redis cache, k8s, code split… #10

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
permissions:
contents: read
jobs:
build-and-push:
name: Build & push images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & push backend
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: ghcr.io/${{ github.repository }}/backend:${{ github.sha }},ghcr.io/${{ github.repository }}/backend:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build & push frontend
uses: docker/build-push-action@v5
with:
context: .
file: frontend.Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}/frontend:${{ github.sha }},ghcr.io/${{ github.repository }}/frontend:latest
cache-from: type=gha
cache-to: type=gha,mode=max
deploy-staging:
name: Deploy to staging
needs: build-and-push
runs-on: ubuntu-latest
environment: staging
steps:
- name: Deploy backend
run: echo "Deploy backend image to staging — configure your platform here"
- name: Run migrations
run: echo "alembic upgrade head — run in staging container"
- name: Smoke test
run: |
sleep 10
curl -f https://api-staging.archmind.io/api/health || exit 1
deploy-prod:
name: Deploy to production
needs: deploy-staging
runs-on: ubuntu-latest
environment: production
steps:
- name: Blue-green deploy
run: echo "Flip prod traffic to new image — configure your platform here"