-
Notifications
You must be signed in to change notification settings - Fork 90
42 lines (39 loc) · 1.23 KB
/
main.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
name: Deploy Prod
on:
push:
branches:
- main
permissions:
id-token: write
contents: write
pull-requests: write
jobs:
deploy:
name: deploy-prod
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Update domain settings
uses: mikefarah/yq@master
with:
cmd: |
yq -i '.stages.prod.params.customDomainName = "${{ vars.CUSTOM_DOMAIN_NAME }}"' serverless-compose.yml
yq -i '.stages.prod.params.customDomainCertificateARN = "${{ vars.CUSTOM_DOMAIN_CERTIFICATE_ARN }}"' serverless-compose.yml
- name: Configure AWS Credentials - Serverless Marketing AWS Account
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::488110005556:role/GithubActionsDeploymentRole
aws-region: us-east-1
- name: Serverless Deploy - Prod
uses: serverless/github-action@v4
with:
args: deploy --stage prod
env:
SERVERLESS_LICENSE_KEY: ${{ secrets.SERVERLESS_LICENSE_KEY }}