Skip to content

Bump next from 14.2.4 to 14.2.12 in /frontend #229

Bump next from 14.2.4 to 14.2.12 in /frontend

Bump next from 14.2.4 to 14.2.12 in /frontend #229

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: πŸ—’οΈ Create Frontend .env
# run: |
# touch .env
# echo NEXT_PUBLIC_USER_POOL_ID=${{ secrets.USER_POOL_ID }} >> .env
# echo NEXT_PUBLIC_USER_POOL_CLIENT_ID=${{ secrets.USER_POOL_CLIENT_ID }} >> .env
# echo NEXT_PUBLIC_APPSYNC_API_ENDPOINT=${{ secrets.APPSYNC_API_ENDPOINT }} >> .env
# echo NEXT_PUBLIC_APPSYNC_REGION=${{ secrets.REGION }} >> .env
# working-directory: frontend
# - name: πŸ— Build Frontend
# run: npm run build-frontend
# working-directory: infrastructure
- name: πŸ—’οΈ Create Backend .env
run: |
touch .env
echo CERTIFICATE_ARN=${{ secrets.CERTIFICATE_ARN }} >> .env
echo DLQ_NOTIFICATIONS=${{ secrets.DLQ_NOTIFICATIONS }} >> .env
working-directory: backend
- 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
- 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
# - name: πŸš€ Deploy Frontend
# run: npx sst deploy --stage prod
# working-directory: frontend