Skip to content

chore(ci): re-enable code-quality and test jobs in deploy workflow #15

chore(ci): re-enable code-quality and test jobs in deploy workflow

chore(ci): re-enable code-quality and test jobs in deploy workflow #15

Workflow file for this run

name: πŸš€ Deploy to AWS Lambda
on:
push:
branches:
- master
- develop
workflow_dispatch:
inputs:
stage:
description: 'Stage to deploy (dev/prod)'
required: true
type: choice
options:
- dev
- prod
jobs:
code-quality:
uses: ./.github/workflows/code-quality.yml
test:
uses: ./.github/workflows/test.yml
deploy:
name: Deploy to AWS Lambda
runs-on: ubuntu-latest
needs: [code-quality, test]
if: |
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
needs.code-quality.result == 'success' &&
needs.test.result == 'success'
steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4
- name: πŸ”§ Setup Environment
uses: ./.github/actions/setup-environment
- name: πŸ” Configure AWS
uses: ./.github/actions/configure-aws
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION || 'us-east-1' }}
- name: πŸ” Determine Stage and Scope
id: deployment
uses: ./.github/actions/determine-stage
with:
event-name: ${{ github.event_name }}
ref: ${{ github.ref }}
input-stage: ${{ github.event.inputs.stage }}
- name: πŸ“ Generate API Version
id: version
uses: ./.github/actions/generate-version
with:
run-number: ${{ github.run_number }}
- name: πŸš€ Deploy to AWS Lambda
uses: ./.github/actions/deploy-lambda
with:
stage: ${{ steps.deployment.outputs.stage }}
region: ${{ secrets.AWS_REGION || 'us-east-1' }}
api-version: ${{ steps.version.outputs.version }}
cors-origins: ${{ secrets.CORS_ORIGINS || '["*"]' }}
tor-browser-path: ${{ secrets.TOR_BROWSER_PATH || '' }}
tor-data-dir: ${{ secrets.TOR_DATA_DIR || '' }}
database-url: ${{ secrets.DATABASE_URL || '' }}
- name: βœ… Deploy Summary
if: always()
uses: ./.github/actions/deploy-summary
with:
version: ${{ steps.version.outputs.version }}
stage: ${{ steps.deployment.outputs.stage }}
scope: ${{ steps.deployment.outputs.scope }}
branch: ${{ github.ref_name }}
commit: ${{ github.sha }}