-
Notifications
You must be signed in to change notification settings - Fork 28
72 lines (57 loc) · 1.64 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: publish
env:
DB_PROFILES: ${{ secrets.DB_PROFILES }}
on:
workflow_dispatch:
inputs:
db_profile:
type: string
description: 'Databricks environment to publish HTML from'
default: DEMO
db_path:
type: string
description: 'Repository path on databricks environment'
required: true
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.9"
- name: Install dependencies
run: |
pip install git+https://github.com/databricks-industry-solutions/industry-solutions-release
- name: Package solution accelerator
run: |
import os
import configparser
import io
from databricks.solutions import Accelerator
buf = io.StringIO(os.environ['DB_PROFILES'])
config = configparser.ConfigParser()
config.read_file(buf)
Accelerator(
db_host=config['host'],
db_token=config['token'],
db_path='${{ github.event.inputs.path }}',
db_name='${{ github.event.repository.name }}',
).release()
shell: python
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4