Skip to content

fix name of app for api_admin_panel #30

fix name of app for api_admin_panel

fix name of app for api_admin_panel #30

Workflow file for this run

name: deploy
on:
push:
branches:
- lendemor/deploy_pipeline
jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
folders: ${{ steps.generate-matrix.outputs.folders }}
steps:
- uses: actions/checkout@v3
- name: Generate Matrix
id: generate-matrix
run: |
FOLDERS=$(ls -d */ | sed 's|/||g' | jq -R -s -c 'split("\n")[:-1]')
echo "folders=$FOLDERS" >> $GITHUB_OUTPUT
- name: Debug output (matrix)
run: |
echo "Subfolders: ${{ env.folders }}"
deploy:
needs: setup-matrix
runs-on: ubuntu-latest
environment: Cloud Deploy
strategy:
matrix:
folder: ${{fromJson(needs.setup-matrix.outputs.folders)}}
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pip install -r ${{ matrix.folder }}/requirements.txt
- name: Set environment dynamically
id: set-env
run: |
case ${{ matrix.folder }} in
ai_image_gen)
echo "EXTRA_ENV=--env REPLICATE_API_TOKEN=${{ secrets.REPLICATE_API_TOKEN }}" >> $GITHUB_ENV
;;
sales)
echo "EXTRA_ENV=--env OPEN_AI_KEY=${{ secrets.OPEN_AI_KEY }}" >> $GITHUB_ENV
;;
*)
echo "EXTRA_ENV=" >> $GITHUB_ENV
;;
esac
- name: Deploy to ReflexCloud
env:
REFLEX_AUTH_TOKEN: ${{ secrets.REFLEX_AUTH_TOKEN }}
run: |
chmod +x deploy.sh
./deploy.sh ${{ matrix.folder }} "$EXTRA_ENV"