Skip to content

fix: Adds a secondary check and a fall back to Plain (#2118) #1115

fix: Adds a secondary check and a fall back to Plain (#2118)

fix: Adds a secondary check and a fall back to Plain (#2118) #1115

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
concurrency:
group: deploy
cancel-in-progress: false
jobs:
agent_local_test:
uses: ./.github/workflows/test_agent_local.yaml
build_agent_image:
needs:
- agent_local_test
uses: ./.github/workflows/job_build_agent_image.yaml
secrets:
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
agent_production_deployment:
needs:
- build_agent_image
- api_preview_test
- agent_staging_deployment
uses: ./.github/workflows/job_deploy_agent_production.yaml
secrets:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }}
api_local_test:
name: Test API
uses: ./.github/workflows/job_test_api_local.yaml
api_preview_deployment:
needs:
- api_local_test
uses: ./.github/workflows/job_deploy_api_staging.yaml
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
agent_staging_deployment:
needs:
- agent_local_test
- build_agent_image
uses: ./.github/workflows/job_deploy_agent_staging.yaml
secrets:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
semantic_cache_preview_deployment:
uses: ./.github/workflows/job_deploy_semanticcache_staging.yaml
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
api_preview_test:
needs:
- agent_staging_deployment
- api_preview_deployment
uses: ./.github/workflows/job_test_api_staging.yaml
with:
UNKEY_BASE_URL: https://preview-api.unkey.dev
secrets:
DATABASE_HOST: ${{ secrets.DATABASE_HOST }}
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
api_canary_deployment:
needs:
- api_local_test
- api_preview_test
uses: ./.github/workflows/job_deploy_api_canary.yaml
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
api_canary_test:
needs:
- api_canary_deployment
- agent_production_deployment
uses: ./.github/workflows/job_test_api_canary.yaml
with:
UNKEY_BASE_URL: https://canary.unkey.dev
secrets:
DATABASE_HOST: ${{ secrets.DATABASE_HOST }}
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
# api_canary_benchmark:
# if: ${{false}}
# environment: Canary
# needs:
# - api_canary_deployment
# - agent_production_deployment
# strategy:
# fail-fast: false
# matrix:
# region: [
# "us-east-1",
# "us-east-2",
# "us-west-1",
# "us-west-2",
# "ap-south-2",
# "ap-southeast-3",
# "ap-southeast-4",
# "ap-south-1",
# "ap-northeast-3",
# "ap-northeast-2",
# "ap-southeast-1",
# "ap-southeast-2", # sydney
# "ca-central-1", # Canada
# "eu-central-1", # Frankfurt
# "eu-west-2", # London
# "sa-east-1", # Sao Paulo,
# ]
# name: Artillery in ${{ matrix.region }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Prepare
# shell: bash
# run: |
# cat <<EOF > .keys.csv
# ${{ secrets.ARTILLERY_KEYS_CSV }}
# EOF
# working-directory: tools/artillery
# - name: Run
# run: npx artillery@latest run-lambda --record --key=${{ secrets.ARTILLERY_CLOUD_KEY }} --region ${{ matrix.region }} --count=5 --target=https://canary.unkey.dev ./keys.verifyKey.yaml
# working-directory: tools/artillery
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
api_production_deployment:
needs:
- api_canary_test
- agent_production_deployment
uses: ./.github/workflows/job_deploy_api_production.yaml
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
semantic_cache_production_deployment:
needs:
- semantic_cache_preview_deployment
# - agent_production_deployment
uses: ./.github/workflows/job_deploy_semanticcache_production.yaml
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
mintlify_deployment:
needs:
- api_production_deployment
runs-on: ubuntu-latest
name: Deploy docs
steps:
- uses: actions/checkout@v4
- name: Redeploy
run: |
curl --request POST \
--url https://api.mintlify.com/v1/project/update/648b83e0e20b94f5a3e41a70 \
--header 'Authorization: Bearer ${{secrets.MINTLIFY_API_KEY}}'
logdrain_production_deployment:
needs:
- api_production_deployment
- semantic_cache_production_deployment
uses: ./.github/workflows/job_deploy_logdrain_production.yaml
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# trigger_production_deployment:
# uses: ./.github/workflows/deploy_trigger.yaml
deploy-enterprise-worker:
needs: api_production_deployment
uses: ./.github/workflows/job_deploy_api_enterprise.yaml
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}