11871836073 Deploy streamlit app and semantic models #27
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
name: Deploy Cortex Streamlit App | |
run-name: ${{ github.run_id }} Deploy streamlit app and semantic models | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'SiS/**' | |
jobs: | |
deploy-semantic-models-and-streamlit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ vars.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | | |
python --version | |
pip install -r requirements.txt | |
- name: Write snowCLI profile to file | |
run: | | |
mkdir -p ~/.snowflake | |
cat <<EOF > ~/.snowflake/config.toml | |
${{ secrets.SNOWFLAKE_CLI_PROFILE }} | |
EOF | |
chmod 0600 ~/.snowflake/config.toml | |
snow connection set-default DEMO_CORTEX_ACCOUNT_ADMIN | |
- name: Deploy semantic models and Streamlit app | |
run: | | |
make upload-semantic-models | |
make deploy-streamlit-app |