Merge pull request #88 from decentralised-dataexchange/60-api-integra… #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release to staging | |
on: | |
push: | |
branches: | |
- main | |
env: | |
PROJECT_ID: ${{ secrets.GKE_PROJECT }} | |
GKE_CLUSTER: igrant-cluster | |
GKE_ZONE: europe-west4-c | |
jobs: | |
setup-build-publish-deploy: | |
name: Setup, Build, Publish, and Deploy | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: google-github-actions/setup-gcloud@v0 | |
with: | |
version: "270.0.0" | |
service_account_key: ${{ secrets.GKE_SA_KEY }} | |
project_id: ${{ secrets.GKE_PROJECT }} | |
- run: |- | |
gcloud --quiet auth configure-docker | |
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e | |
with: | |
cluster_name: ${{ env.GKE_CLUSTER }} | |
location: ${{ env.GKE_ZONE }} | |
credentials: ${{ secrets.GKE_SA_KEY }} | |
- name: Replace the API URL | |
run: | | |
sed -i "s/const baseUrl = 'http:\/\/.*'/const baseUrl = 'https:\/\/api.nxd.foundation'/" src/utils/fetchWrapper.ts | |
sed -i "s/const baseUrl = 'https:\/\/.*'/const baseUrl = 'https:\/\/api.nxd.foundation'/" src/utils/fetchWrapper.ts | |
- name: Deploy | |
run: |- | |
make build/docker/deployable publish deploy/staging |