From a2e0ac5ab36e29044a57df211fc389485fe531b8 Mon Sep 17 00:00:00 2001 From: devtmaz Date: Thu, 18 Jun 2026 16:37:33 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=99=88=20exclude=20sandbox=20dir=20in?= =?UTF-8?q?=20gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 957ee17..440bd32 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ __pycache__/ .venv*/ venv*/ +sandbox/ scratch/** !scratch/README.md **/explorations/** From ccf2b360c212de43d66d12f235fc98047cf5c24d Mon Sep 17 00:00:00 2001 From: devtmaz Date: Thu, 18 Jun 2026 16:37:48 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=91=B7=20add=20cd=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd-workflow.yml | 82 +++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/cd-workflow.yml diff --git a/.github/workflows/cd-workflow.yml b/.github/workflows/cd-workflow.yml new file mode 100644 index 0000000..dc6ff2d --- /dev/null +++ b/.github/workflows/cd-workflow.yml @@ -0,0 +1,82 @@ +name: CD Workflow + +on: + push: + branches: + - main + +jobs: + cd-deploy-test: + name: Deploy to TEST + runs-on: ubuntu-latest + environment: test + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install Databricks CLI + run: curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh + + - name: Install Dependencies + run: | + pip install --upgrade pip + pip install setuptools wheel + + - name: Configure Databricks + run: | + # write out the profile (here called "TEST") + cat < ~/.databrickscfg + [TEST] + host = https://dbc-7fec11f6-2f19.cloud.databricks.com + client_id = ${{ secrets.SP_CLIENT_ID }} + client_secret = ${{ secrets.SP_CLIENT_SECRET }} + EOF + + - name: Deploy to TEST + run: | + databricks bundle deploy \ + --target test \ + --profile TEST + + cd-deploy-prod: + name: Deploy to PROD + needs: cd-deploy-test + runs-on: ubuntu-latest + environment: prod + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install Databricks CLI + run: curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh + + - name: Install Dependencies + run: | + pip install --upgrade pip + pip install setuptools wheel + + - name: Configure Databricks + run: | + # write out the profile (here called "PROD") + cat < ~/.databrickscfg + [PROD] + host = https://dbc-af8eb77a-a3a0.cloud.databricks.com + client_id = ${{ secrets.SP_CLIENT_ID }} + client_secret = ${{ secrets.SP_CLIENT_SECRET }} + EOF + + - name: Deploy to PROD + run: | + databricks bundle deploy \ + --target prod \ + --profile PROD \ No newline at end of file