Skip to content

Merge pull request #2152 from mito-ds/feat/add-chart-wiz-field #1608

Merge pull request #2152 from mito-ds/feat/add-chart-wiz-field

Merge pull request #2152 from mito-ds/feat/add-chart-wiz-field #1608

name: Deploy - mitosheet
on:
push:
branches:
- dev
- main
jobs:
deploy-mitosheet:
name: Deploy mitosheet
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@v4
with:
ref: ${{ steps.extract_branch.outputs.branch }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Setup Auth for PyPi
run: |
echo -e "[distutils]" >> ~/.pypirc
echo -e "index-servers =" >> ~/.pypirc
echo -e " pypi" >> ~/.pypirc
echo -e " testpypi" >> ~/.pypirc
echo -e "[pypi]" >> ~/.pypirc
echo -e "repository = https://upload.pypi.org/legacy/" >> ~/.pypirc
echo -e "username = __token__" >> ~/.pypirc
echo -e "password = ${{ secrets.PYPI_API_TOKEN }}" >> ~/.pypirc
echo -e "" >> ~/.pypirc
echo -e "[testpypi]" >> ~/.pypirc
echo -e "repository = https://test.pypi.org/legacy/" >> ~/.pypirc
echo -e "username = __token__" >> ~/.pypirc
echo -e "password = ${{ secrets.TEST_PYPI_API_TOKEN }}" >> ~/.pypirc
- name: Setup mitosheet
run: |
cd mitosheet
rm -rf venv
python3 -m venv venv
source venv/bin/activate
python ../deployment/bump_version.py mitosheet ${{ steps.extract_branch.outputs.branch }}
python -m pip install -e ".[deploy]"
jlpm install
jlpm run build
- name: Deploy mitosheet
run: |
cd mitosheet
source venv/bin/activate
python ../deployment/deploy.py ${{ steps.extract_branch.outputs.branch }}