updated configs #13
This file contains hidden or 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
| # This GitHub workflow deploys Bundle resources (ML resource config and more) | |
| # defined under mlops_demo/resources/* | |
| # and mlops_demo/databricks.yml with staging deployment target configs, | |
| # when PRs are merged into the default/main branch | |
| name: Bundle Deployment for mlops_demo Staging | |
| on: | |
| pull_request: | |
| types: | |
| - closed # Trigger workflow when a pull request is closed (merged or not) | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| working-directory: ./mlops_demo | |
| env: | |
| DATABRICKS_TOKEN: ${{ secrets.STAGING_WORKSPACE_TOKEN }} | |
| jobs: | |
| staging: | |
| if: github.event.pull_request.merged == true # Ensures it runs only if the PR is merged | |
| concurrency: mlops_demo-staging-bundle-job | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: databricks/[email protected] | |
| - name: Validate Bundle For Staging | |
| id: validate | |
| run: | | |
| databricks bundle validate -t staging | |
| - name: Deploy Bundle to Staging | |
| id: deploy | |
| run: | | |
| databricks bundle deploy -t staging |