Skip to content

improve benchmark by using multiple geojson so we can check caching #129

improve benchmark by using multiple geojson so we can check caching

improve benchmark by using multiple geojson so we can check caching #129

Workflow file for this run

name: CI / CD
on:
push:
paths:
- "api/**"
- ".github/workflows/cicd.yml"
workflow_dispatch:
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and run tests
run: docker compose up --build --exit-code-from test test
- name: Clean up
run: docker compose down
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build-and-test
if: github.ref == 'refs/heads/develop'
steps:
- name: Deploy to EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEV_HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
cd amazonia-360
git pull --rebase
sudo docker compose down
sudo docker compose up -d api --build
health-check:
name: Health Check
runs-on: ubuntu-latest
needs: deploy
if: github.ref == 'refs/heads/develop'
steps:
- name: URL Health Check
uses: Jtalk/url-health-check-action@v4
with:
url: ${{ secrets.DEV_HEALTHCHECK }}
retries: 5
wait: 10