-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (41 loc) · 1.33 KB
/
merge-production.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
on:
push:
branches:
- production
name: 🚀 Deploy production
concurrency: deploy_production
permissions:
id-token: write # this is required for AWS https://github.com/aws-actions/configure-aws-credentials#usage
contents: read
actions: write
defaults:
run:
shell: bash
jobs:
deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
environment: production
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: pnpm/[email protected]
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Configure AWS Credentials (Authentication)
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
- name: '🚀 Deploy production'
env:
CDK_DEFAULT_REGION: ${{ vars.AWS_REGION }}
CDK_DEFAULT_ACCOUNT: ${{ secrets.AWS_ACCOUNT }}
ALLOWED_HOST: ${{ secrets.ALLOWED_HOST }}
run: cd apps/backend-infrastructure && pnpm cdk deploy --context applicationName="${{ secrets.APPLICATION_NAME }}" --context hostedZoneDomainName="${{ secrets.DOMAIN_NAME }}"