Refresh balances on transaction #240
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: π 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 |