Skip to content

DOP-4414 removing env vars #1647

DOP-4414 removing env vars

DOP-4414 removing env vars #1647

on:
push:
branches:
- "main"
- "integration"
- "DOP-4414"
concurrency:
group: environment-stg-${{ github.ref }}
cancel-in-progress: true
name: Deploy Staging ECS
jobs:
deploy-stg:
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
- 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 stg
sls deploy --stage dotcomstg
- uses: mr-smithers-excellent/docker-build-push@v5
name: build and push to ECR
with:
image: docs-worker-pool-stg
tags: latest
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-dotcomstg
tags: latest
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 stg
sls deploy --stage dotcomstg
- name: Deploy Lambdas
run: |
npm ci
sls deploy --stage stg
sls deploy --stage dotcomstg
sls prune -n 5