Skip to content

Frontend fixes and improvements #2

Frontend fixes and improvements

Frontend fixes and improvements #2

name: CI/CD Mainnet
on:
pull_request:
branches:
- main
types:
- closed
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
sudo install skaffold /usr/local/bin/
shell: bash
- name: Authenticate with Google Cloud
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.GCP_AUTH_KEY }}
project_id: ${{ secrets.PROJECT_ID }}
export_default_credentials: true
- name: Activate Service Account
run: |
gcloud auth activate-service-account ${{ secrets.GCP_SA }} --key-file=$GOOGLE_APPLICATION_CREDENTIALS
gcloud components install gke-gcloud-auth-plugin
- name: Login to GCR
uses: docker/login-action@v3
with:
registry: eu.gcr.io
username: _json_key
password: ${{ secrets.GCP_AUTH_KEY }}
- name: Login to Kubernetes
uses: azure/k8s-set-context@v1
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
cluster-context: ${{ secrets.CLUSTER_CONTEXT }}
namespace: ${{ secrets.K8S_NAMESPACE_MAINNET }}
- name: Build and push Docker images
run: |
cd frontend
export $(grep -v '^#' .env.production | xargs)
envsubst < ../deployment/production/workloads/config/ui-config.template.yaml > ../deployment/production/workloads/config/ui-config.yaml
envsubst < skaffold.production.template.yaml > skaffold.production.yaml
skaffold run --filename skaffold.production.yaml
shell: bash