Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ The inputs this action uses are:
| `create_postgres` | `false` | None | True to create a Postgres instance for the app. |
| `create_persistent_filesystem` | `false` | None | True to create a persistent filesystem for the app. |
| `de_client_version` | `false` | None | Version of the Dash Enterprise client to install. If not provided, the latest version will be installed. |
| `python_version` | `false` | `3.10` | Python version to use for the deployment. If not provided, Python 3.10 will be used. |

### Preview deploy on pull request
This action will deploy branches using the `on: pull_request: types: ['opened', 'edited', 'synchronize', 'closed']` trigger as `https://${DE_HOST}/${APP_NAME}-${event_number}`, e.g. if you are deploying an app called `inventory-analytics` to `example.plotly.host` and your PR number is `15`, the deploy preview would be available at `https://example.plotly.host/inventory-analytics-15` and would be redeployed on every new commit to that PR.
Expand Down
16 changes: 15 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ inputs:
required: false
default: ''
type: string
python_version:
description: Python version to use for the deployment. If not provided, Python 3.10 will be used.
required: false
default: '3.10'
type: string



Expand All @@ -60,7 +65,7 @@ runs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
python-version: ${{ inputs.python_version }}
- name: Install de-client
shell: bash
run: |
Expand Down Expand Up @@ -113,6 +118,15 @@ runs:
-H "X-GitHub-Api-Version: 2022-11-28"\
https://api.github.com/repos/${{ github.repository }}/statuses/${{github.event.pull_request.head.sha || github.sha}}\
-d '{"state":"success","target_url":"https://${{ inputs.DE_HOST }}/apps/${{ steps.app_name.outputs.app_name }}","description":"App manager ready!","context":"deploy/${{ steps.app_name.outputs.app_name }}"}'
- name: Set Python version
shell: bash
if: ${{ inputs.python_version }}
run: |
de --no-keyfile apps update --name ${{ steps.app_name.outputs.app_name }} --python-version ${{ inputs.python_version }}
env:
DASH_ENTERPRISE_HOST: ${{inputs.DE_HOST}}
DASH_ENTERPRISE_PASSWORD: ${{inputs.DE_PASSWORD}}
DASH_ENTERPRISE_USERNAME: ${{inputs.DE_USERNAME}}
- name: Create Redis
shell: bash
if: ${{ inputs.create_redis }}
Expand Down