Skip to content

Merge create-diff-action #15

Merge create-diff-action

Merge create-diff-action #15

Workflow file for this run

---
name: Deploy
on:
push:
branches:
- main
pull_request:
types:
- opened
- labeled
- synchronize
permissions:
contents: read
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: Deploy Stack
uses: ./.github/actions/deploy
with:
role-to-assume: ${{ vars.ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
stack-name: CiCd-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: Deploy Stack
uses: ./.github/actions/deploy
with:
role-to-assume: ${{ vars.ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
stack-name: CiCd-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: Deploy Stack
uses: ./.github/actions/deploy
with:
role-to-assume: ${{ vars.ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
stack-name: CiCd-production