Skip to content

Merge pull request #16 from Real-Life-IaC/fix-kwargs #73

Merge pull request #16 from Real-Life-IaC/fix-kwargs

Merge pull request #16 from Real-Life-IaC/fix-kwargs #73

Workflow file for this run

---
name: Deploy
on:
push:
branches:
- main
pull_request:
types:
- labeled
- synchronize
permissions:
id-token: write
jobs:
deploy-sandbox:
name: Sandbox Deploy
if: |
(github.event.action == 'labeled' && github.event.label.name == ':test_tube: sandbox deploy') ||
(github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, ':test_tube: sandbox deploy')) ||
(github.event_name == 'push' && github.ref_name == 'main')
environment: sandbox
concurrency: sandbox
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node Dependencies and Build React App
shell: bash
run: |
cd app
npm install
npm run build
env:
VITE_API_URL: ${{ vars.API_URL }}
- name: Deploy Stack
uses: ./.github/actions/deploy
with:
role-to-assume: ${{ vars.ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
stack-name: Frontend-sandbox
deploy-staging:
if: github.ref_name == 'main'
name: Staging Deploy
environment: staging
concurrency: staging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node Dependencies and Build React App
shell: bash
run: |
cd app
npm install
npm run build
env:
VITE_API_URL: ${{ vars.API_URL }}
- name: Deploy Stack
uses: ./.github/actions/deploy
with:
role-to-assume: ${{ vars.ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
stack-name: Frontend-staging
deploy-production:
if: github.ref_name == 'main'
name: Production Deploy
environment: production
concurrency: production
runs-on: ubuntu-latest
needs:
- deploy-sandbox
- deploy-staging
steps:
- uses: actions/checkout@v4
- name: Install Node Dependencies and Build React App
shell: bash
run: |
cd app
npm install
npm run build
env:
VITE_API_URL: ${{ vars.API_URL }}
- name: Deploy Stack
uses: ./.github/actions/deploy
with:
role-to-assume: ${{ vars.ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
stack-name: Frontend-production