fix: update layer edit contents between vector layers / raster layers. #1545
Workflow file for this run
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
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
# More GitHub Actions for Azure: https://github.com/Azure/actions | |
name: CIs | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
workflow_dispatch: | |
env: | |
CI: true | |
PNPM_CACHE_FOLDER: .pnpm-store | |
jobs: | |
changes: | |
name: checking file changes | |
runs-on: ubuntu-latest | |
outputs: | |
geohub: ${{ steps.changes.outputs.geohub }} | |
docs: ${{ steps.changes.outputs.docs }} | |
undpdesign: ${{ steps.changes.outputs.undpdesign }} | |
staticapi: ${{ steps.changes.outputs.staticapi }} | |
pgtileserv: ${{ steps.changes.outputs.pgtileserv }} | |
titiler: ${{ steps.changes.outputs.titiler }} | |
datapipeline: ${{ steps.changes.outputs.datapipeline }} | |
cogserver: ${{ steps.changes.outputs.cogserver }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
geohub: | |
- 'sites/geohub/**' | |
- 'packages/**' | |
- '.github/workflows/**' | |
- 'package.json' | |
- 'pnpm-lock.yaml' | |
- 'pnpm-workspace.yaml' | |
- ./docker/Dockerfile.production | |
docs: | |
- 'documentation/**' | |
- '.github/workflows/**' | |
undpdesign: | |
- 'packages/svelte-undp-design/**' | |
- 'package.json' | |
- 'pnpm-lock.yaml' | |
- '.github/workflows/**' | |
staticapi: | |
- 'sites/static-image-api/**' | |
- '.github/workflows/**' | |
pgtileserv: | |
- 'backends/k8s/pgtileserv/**' | |
- '.github/workflows/**' | |
titiler: | |
- 'backends/k8s/titiler/**' | |
- '.github/workflows/**' | |
datapipeline: | |
- 'backends/k8s/data-pipeline/**' | |
- '.github/workflows/**' | |
cogserver: | |
- 'backends/k8s/cogserver/cogserver-deployment.yaml' | |
- '.github/workflows/bump-cogserver.yml' | |
- '.github/workflows/ci.yml' | |
lint_build: | |
name: lint, build and test for GeoHub | |
needs: changes | |
if: ${{ github.ref == 'refs/heads/main' || needs.changes.outputs.geohub == 'true' }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18] | |
steps: | |
- name: checkout code repository | |
uses: actions/checkout@v4 | |
- uses: pnpm/[email protected] | |
with: | |
version: 8.6.1 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: pnpm | |
- name: install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Run Prettier | |
run: pnpm format | |
- name: Run lint | |
run: pnpm lint | |
- name: build | |
run: pnpm build | |
- name: Run unit tests | |
run: pnpm test | |
- name: Copy package.json / lock files to build folder | |
working-directory: ./sites/geohub | |
run: ./build-nodemodules.sh | |
- name: Archive artifact for deployment | |
run: zip release.zip ./sites/geohub/build/* -r | |
- name: Upload build outputs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: geohub-build-output | |
path: release.zip | |
deploy_to_develop: | |
name: Build and deploy Node.js app to Development | |
if: ${{ github.ref == 'refs/heads/develop'}} | |
needs: lint_build | |
runs-on: ubuntu-latest | |
environment: | |
name: Development | |
url: https://dev.undpgeohub.org | |
steps: | |
- name: checkout code repository | |
uses: actions/checkout@v4 | |
- name: download build files from artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: geohub-build-output | |
- name: unzip artifact for deployment | |
run: unzip release.zip | |
- name: "Deploy to Azure Web App for undpgeohub-dev" | |
id: deploy-to-webapp-dev | |
uses: azure/webapps-deploy@v3 | |
with: | |
app-name: "undpgeohub-dev" | |
slot-name: "Production" | |
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE }} | |
package: ./sites/geohub/build | |
deploy_to_production: | |
name: Build and deploy Node.js app to Production | |
needs: lint_build | |
if: ${{ github.ref == 'refs/heads/main'}} | |
runs-on: ubuntu-latest | |
environment: | |
name: Production | |
url: https://geohub.data.undp.org | |
steps: | |
- name: checkout code repository | |
uses: actions/checkout@v4 | |
- name: download build files from artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: geohub-build-output | |
- name: unzip artifact for deployment | |
run: unzip release.zip | |
- name: "Deploy to Azure for undpgeohub" | |
id: deploy-to-webapp | |
uses: azure/webapps-deploy@v3 | |
with: | |
app-name: "undpgeohub" | |
slot-name: "Production" | |
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE }} | |
package: ./sites/geohub/build | |
build-docker: | |
name: Build Docker Image | |
needs: changes | |
if: ${{ needs.changes.outputs.geohub == 'true' }} | |
runs-on: ubuntu-latest | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: undp-data/geohub | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build the Docker image | |
run: | | |
IMAGE_NAME=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$(date +%s) ./docker/docker-build-prod.sh | |
build-and-deploy-undp-design: | |
name: Build and deploy svelte UNDP design storybook | |
needs: changes | |
if: ${{ needs.changes.outputs.undpdesign == 'true' }} | |
runs-on: ubuntu-latest | |
environment: | |
name: Svelte UNDP Design | |
url: https://svelte-undp-design.undpgeohub.org/ | |
steps: | |
- name: checkout code repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/[email protected] | |
with: | |
version: 8.6.1 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: pnpm | |
- name: install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: build storybook | |
run: | | |
pnpm --filter="./packages/svelte-undp-design" build | |
pnpm --filter="./packages/svelte-undp-design" build-storybook | |
- name: deploy storybook to Blob container | |
if: ${{ (github.ref == 'refs/heads/develop') }} | |
uses: bacongobbler/azure-blob-storage-upload@main | |
with: | |
source_dir: packages/svelte-undp-design/storybook-static | |
container_name: $web | |
connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING_STORYBOOK }} | |
# WARNING: this will overwrite existing blobs in your blob storage | |
sync: "true" | |
build-and-deploy-userguide: | |
name: Build and deploy GeoHub userguide | |
needs: changes | |
if: ${{ needs.changes.outputs.docs == 'true' }} | |
runs-on: ubuntu-latest | |
environment: | |
name: GeoHub UserGuide | |
url: https://docs.undpgeohub.org/ | |
steps: | |
- name: checkout code repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
- name: Install dependecies | |
working-directory: ./documentation | |
run: | | |
pip install pipenv | |
pipenv install --system | |
- name: Build documentation | |
working-directory: ./documentation | |
run: mkdocs build | |
- name: deploy userguide to Blob container | |
if: ${{ (github.ref == 'refs/heads/develop') }} | |
uses: bacongobbler/azure-blob-storage-upload@main | |
with: | |
source_dir: documentation/site | |
container_name: $web | |
connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING_USERGUIDE }} | |
# WARNING: this will overwrite existing blobs in your blob storage | |
sync: "true" | |
build_static_api: | |
name: Build and deploy Static Image API | |
needs: changes | |
if: ${{ needs.changes.outputs.staticapi == 'true' }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [18] | |
env: | |
IMAGE_NAME: geohub-static-image-api | |
environment: | |
name: Static Image API | |
url: https://staticimage.undpgeohub.org | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Log into ACR | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.ACR_ENDPOINT }} | |
username: ${{ secrets.ACR_USERNAME }} | |
password: ${{ secrets.ACR_PASSWORD }} | |
- name: Extract Docker metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ secrets.ACR_ENDPOINT }}/${{ env.IMAGE_NAME }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./sites/static-image-api | |
push: ${{ github.ref == 'refs/heads/develop'}} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
k8s_pgtileserv_deploy: | |
name: Deploy pg_tileserv to Kubernetes | |
needs: changes | |
if: ${{ github.ref == 'refs/heads/develop' && needs.changes.outputs.pgtileserv == 'true' }} | |
runs-on: ubuntu-22.04 | |
env: | |
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} | |
PGTILESERV_NAMESPACE: pgtileserv | |
environment: | |
name: K8S pgtileserv | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Deploy pgtileserv to kubernetes | |
uses: actions-hub/kubectl@master | |
with: | |
args: apply -f backends/k8s/pgtileserv/yaml/pgtileserv-deployment.yaml | |
- name: Delete Secrets for pgtileserv | |
uses: actions-hub/kubectl@master | |
with: | |
args: delete secret pgtileserv-secrets --ignore-not-found -n ${{ env.PGTILESERV_NAMESPACE }} | |
- name: Create Secrets for pgtileserv | |
uses: actions-hub/kubectl@master | |
with: | |
args: create secret generic pgtileserv-secrets --from-literal=DATABASE_URL=${{ secrets.DATABASE_URL }} -n ${{ env.PGTILESERV_NAMESPACE }} | |
k8s_titiler_deploy: | |
name: Deploy titiler to Kubernetes | |
needs: changes | |
if: ${{ github.ref == 'refs/heads/develop' && needs.changes.outputs.titiler == 'true' }} | |
runs-on: ubuntu-22.04 | |
env: | |
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} | |
environment: | |
name: K8S titiler | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Deploy titiler to kubernetes | |
uses: actions-hub/kubectl@master | |
with: | |
args: apply -f backends/k8s/titiler/yaml/titiler-deployment.yaml | |
k8s_datapipeline_deploy: | |
name: Deploy geohub-data-pipeline to Kubernetes | |
needs: changes | |
if: ${{ github.ref == 'refs/heads/develop' && needs.changes.outputs.datapipeline == 'true' }} | |
runs-on: ubuntu-latest | |
env: | |
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} | |
DEPLOYMENT_NAMESPACE: data | |
environment: | |
name: K8S data-pipeline | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Delete Secrets | |
uses: actions-hub/kubectl@master | |
with: | |
args: delete secret ingest-secrets --ignore-not-found -n ${{ env.DEPLOYMENT_NAMESPACE }} | |
- name: Create Secrets | |
uses: actions-hub/kubectl@master | |
with: | |
args: create secret generic ingest-secrets --from-literal=AZURE_STORAGE_CONNECTION_STRING=${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} --from-literal=SERVICE_BUS_CONNECTION_STRING=${{ secrets.SERVICE_BUS_CONNECTION_STRING }} --from-literal=AZURE_WEBPUBSUB_CONNECTION_STRING=${{ secrets.AZURE_WEBPUBSUB_CONNECTION_STRING }} -n ${{ env.DEPLOYMENT_NAMESPACE }} | |
- name: Deploy ingest to kubernetes | |
uses: actions-hub/kubectl@master | |
env: | |
SERVICE_BUS_CONNECTION_STRING: ${{ secrets.SERVICE_BUS_CONNECTION_STRING }} | |
with: | |
args: apply -f backends/k8s/data-pipeline/yaml/ingest-environment.yaml | |
k8s_cogserver_deploy: | |
name: Deploy cogserver to Kubernetes | |
needs: changes | |
if: ${{ github.ref == 'refs/heads/develop' && needs.changes.outputs.cogserver == 'true' }} | |
runs-on: ubuntu-22.04 | |
env: | |
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} | |
environment: | |
name: K8S cogserver | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Deploy cogserver to kubernetes | |
uses: actions-hub/kubectl@master | |
with: | |
args: apply -f backends/k8s/cogserver/yaml/cogserver-deployment.yaml |