Merge pull request #1379 from mito-ds/improve-ai-chat-prompt #56
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 - Mito AI | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
jobs: | |
deploy-mito-ai: | |
name: Deploy mito-ai | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: [3.11] | |
steps: | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ steps.extract_branch.outputs.branch }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- 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 mito-ai | |
run: | | |
cd mito-ai | |
rm -rf venv | |
python3 -m venv venv | |
source venv/bin/activate | |
python -m pip install --upgrade pip setuptools wheel | |
python ../deployment/bump_version.py mito-ai ${{ steps.extract_branch.outputs.branch }} | |
python -m pip install -e ".[deploy]" --verbose | |
python -m pip check | |
jlpm install | |
jlpm run build | |
- name: Deploy mito-ai | |
run: | | |
cd mito-ai | |
source venv/bin/activate | |
python ../deployment/deploy.py ${{ steps.extract_branch.outputs.branch }} |