Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches:
- main

permissions:
id-token: write
contents: write
pull-requests: write

jobs:
deploy:
name: deploy-prod
Expand All @@ -24,11 +29,14 @@ jobs:
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: Serverless Deploy
- 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 }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
14 changes: 11 additions & 3 deletions .github/workflows/pr-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches:
- main

permissions:
id-token: write
contents: write
pull-requests: write

jobs:
remove:
name: deploy-pr-preview
Expand All @@ -18,11 +23,14 @@ jobs:
cache: "npm"
- name: Install dependencies
run: npm ci
- name: serverless deploy
- 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 - PR Preview
uses: serverless/github-action@v4
with:
args: deploy --stage pr-${{ github.event.pull_request.number }}
env:
SERVERLESS_LICENSE_KEY: ${{ secrets.SERVERLESS_LICENSE_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
14 changes: 11 additions & 3 deletions .github/workflows/pr-remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
types:
- closed

permissions:
id-token: write
contents: write
pull-requests: write

jobs:
remove:
name: remove-pr-preview
Expand All @@ -18,11 +23,14 @@ jobs:
cache: "npm"
- name: Install dependencies
run: npm ci
- name: serverless remove
- 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 Remove - PR Preview
uses: serverless/github-action@v4
with:
args: remove --stage pr-${{ github.event.pull_request.number }}
env:
SERVERLESS_LICENSE_KEY: ${{ secrets.SERVERLESS_LICENSE_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}