Skip to content

Update command in dockerfile #42

Update command in dockerfile

Update command in dockerfile #42

Workflow file for this run

name: Deploy
on:
push:
jobs:
deploy-dev:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2.3.3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-frontend-access
aws-region: ap-south-1
- name: Build nginx and push on ECR
run: |
cd nginx
sed -i "s|WEBSITE_URL|dev-stack.canopas.com|g" conf.d/default.conf
bash ./../deploy/deploy-ecr-image.sh dev-nginx ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com/canopas-blog-nginx
- name: Build frontend and push on ECR
run: |
bash ./deploy/deploy-ecr-image.sh dev-blog ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com/canopas-blog
- name: Deploy cloudformation stack
id: canopas-blog-dev-ECS-EC2-stack
uses: aws-actions/aws-cloudformation-github-deploy@v1
with:
name: canopas-blog-dev-ECS-EC2-stack
template: infrastructure/template.yml
capabilities: CAPABILITY_IAM,CAPABILITY_NAMED_IAM
timeout-in-minutes: "10"
no-fail-on-empty-changeset: "1"
parameter-overrides: >-
EnvName=dev,
ApiBase=${{ secrets.NEXT_PUBLIC_API_BASE }},
IframelyKey=${{ secrets.NEXT_PUBLIC_IFRAMELY_KEY }},
MixpanelProjectToken=${{ secrets.NEXT_PUBLIC_MIXPANEL_PROJECT_TOKEN }},
RecaptchaSiteKey=${{ secrets.NEXT_PUBLIC_RECAPTCHA_SITE_KEY }},
StrapiDomain=${{ secrets.NEXT_PUBLIC_STRAPI_DOMAIN }},
StrapiURL=${{ secrets.NEXT_PUBLIC_STRAPI_URL }},
WebsiteURL=${{ secrets.NEXT_PUBLIC_WEBSITE_URL }},
ClusterName=canopas-blog-dev,
ImageTag=${{ github.sha }}-${{ github.run_attempt }}-dev-frontend,
NginxImageTag=${{ github.sha }}-${{ github.run_attempt }}-dev-nginx