From a2cfc14a87327605ce270855988f7eea08f905db Mon Sep 17 00:00:00 2001 From: Ravind Kumar Date: Wed, 13 Nov 2024 14:55:32 -0500 Subject: [PATCH] Attempting to build CI/CD --- .github/workflows/makefile.yml | 44 ++++++++++++++++++++++++++++++++++ build-docs-ci.sh | 39 ++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 .github/workflows/makefile.yml create mode 100755 build-docs-ci.sh diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml new file mode 100644 index 00000000..090a41da --- /dev/null +++ b/.github/workflows/makefile.yml @@ -0,0 +1,44 @@ +name: Makefile CI + +on: + push: + branches: [ "main" ] + pull_request: + type: ["opened","synchronize"] + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: install-python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: pip-requirements + run: pip install -r requirements.txt + + - name: npm-setup + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: npm-install-setup + uses: bahmutov/npm-install@v1 + with: + working-directory: ./ + + - name: build-docs + run: ./build-docs-ci.sh + + - name: upload-artifact + uses: actions/upload-artifact@v4 + with: + name: minio-docs-artifact + compression-level: 9 + path: ./docs/ diff --git a/build-docs-ci.sh b/build-docs-ci.sh new file mode 100755 index 00000000..f1e5a272 --- /dev/null +++ b/build-docs-ci.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +set -ex + +branch=$(git branch --show-current) + +export PATH=${PATH}:${HOME}/.local/bin + + +make SYNC_SDK=TRUE linux +make windows macos container k8s openshift eks aks gke + +mkdir -p docs/minio/kubernetes/upstream +cp -vr build/${branch}/k8s/html/* docs/minio/kubernetes/upstream/ + +mkdir -p docs/minio/kubernetes/eks +cp -vr build/${branch}/eks/html/* docs/minio/kubernetes/eks/ + + +mkdir -p docs/minio/kubernetes/gke +cp -vr build/${branch}/gke/html/* docs/minio/kubernetes/gke/ + +mkdir -p docs/minio/kubernetes/aks +cp -vr build/${branch}/aks/html/* docs/minio/kubernetes/aks/ + +mkdir -p docs/minio/kubernetes/openshift +cp -vr build/${branch}/openshift/html/* docs/minio/kubernetes/openshift/ + +mkdir -p docs/minio/container +cp -vr build/${branch}/container/html/* docs/minio/container/ + +mkdir -p docs/minio/linux +cp -vr build/${branch}/linux/html/* docs/minio/linux/ + +mkdir -p docs/minio/macos +cp -vr build/${branch}/macos/html/* docs/minio/macos/ + +mkdir -p docs/minio/windows +cp -vr build/${branch}/windows/html/* docs/minio/windows/