Skip to content

v1.5.43

v1.5.43 #184

Workflow file for this run

on:
release:
types: [released]
concurrency:
group: environment-prd-${{ github.ref }}
cancel-in-progress: true
name: Deploy Production ECS
jobs:
deploy-prd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Install Serverless Framework
run: npm install -g serverless@3
- name: Serverless AWS authentication
run: sls config credentials --provider aws --key ${{ secrets.AWS_ACCESS_KEY_ID }} --secret ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: login-ecr
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Create ECS Repo
run: |
cd infrastructure/ecs-repo
npm ci
sls deploy --stage prd
sls deploy --stage dotcomprd
- uses: mr-smithers-excellent/docker-build-push@v5
name: build and push to ECR
with:
image: docs-worker-pool-prd
tags: latest, ${{ github.sha }}
registry: ${{ steps.login-ecr.outputs.registry }}
buildArgs: NPM_EMAIL=${{ secrets.NPM_EMAIL }},NPM_BASE_64_AUTH=${{ secrets.NPM_BASE64_AUTH }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NPM_BASE_64_AUTH: ${{ secrets.NPM_BASE64_AUTH }}
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
- uses: mr-smithers-excellent/docker-build-push@v5
name: build and push to ECR Dotcom
with:
image: docs-worker-pool-dotcomprd
tags: latest, ${{ github.sha }}
registry: ${{ steps.login-ecr.outputs.registry }}
buildArgs: NPM_EMAIL=${{ secrets.NPM_EMAIL }},NPM_BASE_64_AUTH=${{ secrets.NPM_BASE64_AUTH }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NPM_BASE_64_AUTH: ${{ secrets.NPM_BASE64_AUTH }}
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
- name: Deploy ECS
run: |
cd infrastructure/ecs-main
npm ci
sls deploy --stage prd
sls deploy --stage dotcomprd
- name: Deploy Lambdas
run: |
npm ci
sls deploy --stage prd
sls deploy --stage dotcomprd
sls prune -n 5