Skip to content

Merge branch 'develop' of github.com:Open-Earth-Foundation/OpenClimate #17

Merge branch 'develop' of github.com:Open-Earth-Foundation/OpenClimate

Merge branch 'develop' of github.com:Open-Earth-Foundation/OpenClimate #17

name: Push ElasticSearch main to EKS prod
on:
workflow_dispatch:
push:
paths:
- api/**
- k8s/prod/openclimate-elasticsearch-deployment.yml.m4
branches: [ "main" ]
jobs:
deployToEKS:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_EKS_PROD_USER }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_EKS_PROD_USER }}
steps:
- uses: actions/checkout@v3
- name: Creating kubeconfig file
run: aws eks update-kubeconfig --name ${{ secrets.EKS_PROD_NAME }} --region us-east-1
- name: Testing connection to EKS
run: kubectl get pods -n default
- name: Deploying service
run: |
m4 -DENV_ELASTIC_PASSWORD="${{secrets.PROD_ELASTIC_PASSWORD}}" \
k8s/prod/openclimate-elasticsearch-deployment.yml.m4 > k8s/prod/openclimate-elasticsearch-deployment.yml
kubectl apply -f k8s/prod/openclimate-elasticsearch-deployment.yml -n default
kubectl rollout restart deployment openclimate-elasticsearch-deployment -n default