Add combobox #221
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |