Skip to content

Commit

Permalink
Merge pull request #216 from 0xPolygonID/develop
Browse files Browse the repository at this point in the history
sync main from develop
  • Loading branch information
0xpulkit authored Nov 26, 2024
2 parents 9604cd7 + 4076d61 commit b2110b6
Show file tree
Hide file tree
Showing 35 changed files with 1,139 additions and 926 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ALGOLIA_API_KEY=213
ALGOLIA_APP_ID=XYZ
22 changes: 13 additions & 9 deletions .github/workflows/deployment_new_aws_account.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Polygon ID Docs Deployment
name: Privado ID Docs Deployment

on:
push:
Expand All @@ -8,6 +8,7 @@ on:

env:
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
ECR_REPOSITORY: devs-ecr
ECS_SERVICE: devs-ecs-service

Expand All @@ -26,8 +27,6 @@ jobs:

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
with:
aws-region: ${{ env.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/PolygonIDActionsRole
Expand All @@ -36,26 +35,31 @@ jobs:
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
with:
mask-password: 'true'

- name: Install dependencies
run: rm -rf node_modules && npm ci

- name: Create .env file
run: echo 'ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }}' >> .env
run: |
echo -e "ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }}" >> .env
echo -e "ALGOLIA_APP_ID=${{ secrets.ALGOLIA_APP_ID }}" >> .env
cat .env
# Runs a single command using the runners shell
- name: Build
run: npm run build

- name: Set ECR registry
run: echo "ECR_REGISTRY=${{ steps.login-ecr.outputs.registry }}" >> $GITHUB_ENV

- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REGISTRY: ${{ env.ECR_REGISTRY }}
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
echo "Using ECR_REGISTRY=$ECR_REGISTRY"
echo "Using IMAGE_TAG=$IMAGE_TAG"
docker build --cache-from $ECR_REGISTRY/$ECR_REPOSITORY:latest -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
Expand Down
82 changes: 0 additions & 82 deletions .github/workflows/prod_deployment.yml

This file was deleted.

82 changes: 0 additions & 82 deletions .github/workflows/staging_deployment.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80

# Start NGINX
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
Loading

0 comments on commit b2110b6

Please sign in to comment.