Skip to content

Tech Debt changes

Tech Debt changes #236

Workflow file for this run

name: deploy
on:
pull_request:
types:
- closed
branches:
- main
jobs:
deploy-prod:
name: Deploy Prod
runs-on: ubuntu-latest
environment: prod
permissions:
actions: write
contents: read
id-token: write
steps:
- name: 🚫 Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout Code
uses: actions/checkout@v4
- name: βš’οΈ Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: πŸ”‘ Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_SERVICE_ROLE_ARN }}
aws-region: us-east-1
- name: πŸ‘€ Env
run: |
echo "Event name: ${{ github.event_name }}"
echo "Git ref: ${{ github.ref }}"
echo "GH actor: ${{ github.actor }}"
echo "SHA: ${{ github.sha }}"
VER=`node --version`; echo "Node ver: $VER"
VER=`npm --version`; echo "npm ver: $VER"
- name: πŸ“₯ Install Backend and Sources
uses: ./.github/actions/backend
# - name: πŸ“₯ Install Frontend
# uses: ./.github/actions/frontend
# - name: πŸ— Build Frontend
# run: npm run build-frontend
# working-directory: infrastructure
# env:
# NEXT_PUBLIC_USER_POOL_ID: ${{ secrets.USER_POOL_ID }}
# NEXT_PUBLIC_USER_POOL_CLIENT_ID: ${{ secrets.USER_POOL_CLIENT_ID }}
# NEXT_PUBLIC_APPSYNC_API_ENDPOINT: ${{ secrets.APPSYNC_API_ENDPOINT }}
# NEXT_PUBLIC_APPSYNC_REGION: ${{ secrets.REGION }}
- name: 🚧 Build AppSync
run: |
npm run build-appsync
working-directory: backend
- name: 🚧 Build Backend
run: |
find ./src/lambda -mindepth 2 -maxdepth 2 -type f -name 'package.json' |
while IFS= read -r file; do
echo "🚧 Building $file"
cd "$(dirname "$file")"
npm run build
cd - >/dev/null
done
working-directory: backend
env:
CERTIFICATE_ARN: ${{ secrets.CERTIFICATE_ARN }}
DLQ_NOTIFICATIONS: ${{ secrets.DLQ_NOTIFICATIONS }}
- name: πŸš€ Deploy Backend
run: |
echo "πŸš€ Deploying backend prod"
npm run cdk -- deploy --all -c stage=backend -c env=prod --require-approval=never
working-directory: backend
env:
CERTIFICATE_ARN: ${{ secrets.CERTIFICATE_ARN }}
DLQ_NOTIFICATIONS: ${{ secrets.DLQ_NOTIFICATIONS }}
# - name: πŸš€ Deploy Frontend
# run: npx sst deploy --stage prod
# working-directory: frontend