Skip to content

remove debug code

remove debug code #100

Workflow file for this run

on:
push:
name: Deploy
env:
ECR_REGISTRY: 151345152001.dkr.ecr.ap-northeast-2.amazonaws.com
ECR_REPOSITORY: popo-nest-api
CODEDEPLOY_APP_NAME: $ECR_REPOSITORY
jobs:
# run-linters:
# name: Run linters
# runs-on: ubuntu-latest
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v2
# - name: Set up Node.js
# uses: actions/setup-node@v1
# with:
# node-version: 14
# # ESLint and Prettier must be in `package.json`
# - name: Install Node.js dependencies
# run: npm ci
# - name: Run linters
# uses: wearerequired/lint-action@v2
# with:
# eslint: true
# prettier: true
docker_build_and_push:
name: Docker build and push
# needs: [run-linters]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64' # support AWS EC2 t4g
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
- name: Determine Prod/Dev Stage
run: |
if [[ ${{ github.ref }} == refs/tags/release-* ]]; then
echo "PROD"
echo "IMAGE_TAG=prod" >> $GITHUB_ENV
else
echo "DEV"
echo "IMAGE_TAG=dev" >> $GITHUB_ENV
fi
- name: Build and Push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64 # support AWS EC2 t4g
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
deploy_health_check:
name: Check Application Status
needs: docker_build_and_push
runs-on: ubuntu-latest
steps:
- name: Check the deployed service URL
uses: jtalk/url-health-check-action@v3
with:
url: https://api.popo.poapper.club|https://api.popo-dev.poapper.club
follow-redirect: true
max-attempts: 3
retry-delay: 10s