Skip to content

Commit

Permalink
ci cd pipeline env file last time
Browse files Browse the repository at this point in the history
  • Loading branch information
Unischneider committed Oct 25, 2024
1 parent 3f64f03 commit 2854b47
Showing 1 changed file with 39 additions and 26 deletions.
65 changes: 39 additions & 26 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ jobs:
source: "./docker/weaviate.yml"
target: /home/${{ vars.VM_USERNAME }}/${{ github.repository }}

- name: Copy env file File for weaviate From Repo to VM Host
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ vars.VM_HOST }}
username: ${{ vars.VM_USERNAME }}
key: ${{ secrets.VM_SSH_PRIVATE_KEY }}
proxy_host: ${{ vars.DEPLOYMENT_GATEWAY_HOST }}
proxy_username: ${{ vars.DEPLOYMENT_GATEWAY_USER }}
proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }}
proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }}
source: "./docker/weaviate/default.env"
target: /home/${{ vars.VM_USERNAME }}/${{ github.repository }}

- name: SSH to VM and create .env.prod
uses: appleboy/ssh-action@v1.0.3
with:
Expand All @@ -80,32 +93,32 @@ jobs:
proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }}
proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }}
script: |
rm .env.prod
touch .env.prod
echo "WEAVIATE_URL=${{ secrets.WEAVIATE_URL }}" >> .env.prod
echo "WEAVIATE_PORT=${{ secrets.WEAVIATE_PORT }}" >> .env.prod
echo "KNOWLEDGE_BASE_FOLDER=${{ secrets.KNOWLEDGE_BASE_FOLDER }}" >> .env.prod
echo "QA_FOLDER=${{ secrets.QA_FOLDER }}" >> .env.prod
echo "DELETE_BEFORE_INIT=${{ secrets.DELETE_BEFORE_INIT }}" >> .env.prod
echo "USE_OLLAMA=${{ secrets.USE_OLLAMA }}" >> .env.prod
echo "USE_AZURE=${{ secrets.USE_AZURE }}" >> .env.prod
echo "OLLAMA_URL=${{ secrets.OLLAMA_URL }}" >> .env.prod
echo "EMBED_MODEL=${{ secrets.EMBED_MODEL }}" >> .env.prod
echo "OPENAI_EMBEDDING_MODEL=${{ secrets.OPENAI_EMBEDDING_MODEL }}" >> .env.prod
echo "API_KEY=${{ secrets.LLAMA_MODEL_TOKEN }}" >> .env.prod
echo "URL=${{ secrets.LLAMA_MODEL_URI }}" >> .env.prod
echo "GPU_USER=${{ secrets.GPU_USER }}" >> .env.prod
echo "GPU_PASSWORD=${{ secrets.GPU_PASSWORD }}" >> .env.prod
echo "OPENAI_MODEL=${{ secrets.OPENAI_MODEL }}" >> .env.prod
echo "GPU_MODEL=${{ secrets.OLLAMA_MODEL }}" >> .env.prod
echo "GPU_HOST=${{ secrets.GPU_HOST }}" >> .env.prod
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> .env.prod
echo "AZURE_OPENAI_API_KEY=${{ secrets.AZURE_OPENAI_API_KEY }}" >> .env.prod
echo "TEST_MODE=${{ secrets.TEST_MODE }}" >> .env.prod
echo "OPENAI_MODEL_DEPLOYMENT=${{ secrets.OPENAI_MODEL_DEPLOYMENT }}" >> .env.prod
echo "COHERE_API_KEY=${{ secrets.COHERE_API_KEY }}" >> .env.prod
echo "COHERE_API_KEY_MULTI=${{ secrets.COHERE_API_KEY_MULTI }}" >> .env.prod
echo "COHERE_API_KEY_EN=${{ secrets.COHERE_API_KEY_EN }}" >> .env.prod
rm /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
touch /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "WEAVIATE_URL=${{ secrets.WEAVIATE_URL }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "WEAVIATE_PORT=${{ secrets.WEAVIATE_PORT }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "KNOWLEDGE_BASE_FOLDER=${{ secrets.KNOWLEDGE_BASE_FOLDER }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "QA_FOLDER=${{ secrets.QA_FOLDER }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "DELETE_BEFORE_INIT=${{ secrets.DELETE_BEFORE_INIT }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "USE_OLLAMA=${{ secrets.USE_OLLAMA }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "USE_AZURE=${{ secrets.USE_AZURE }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "OLLAMA_URL=${{ secrets.OLLAMA_URL }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "EMBED_MODEL=${{ secrets.EMBED_MODEL }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "OPENAI_EMBEDDING_MODEL=${{ secrets.OPENAI_EMBEDDING_MODEL }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "API_KEY=${{ secrets.LLAMA_MODEL_TOKEN }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "URL=${{ secrets.LLAMA_MODEL_URI }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "GPU_USER=${{ secrets.GPU_USER }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "GPU_PASSWORD=${{ secrets.GPU_PASSWORD }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "OPENAI_MODEL=${{ secrets.OPENAI_MODEL }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "GPU_MODEL=${{ secrets.OLLAMA_MODEL }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "GPU_HOST=${{ secrets.GPU_HOST }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "AZURE_OPENAI_API_KEY=${{ secrets.AZURE_OPENAI_API_KEY }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "TEST_MODE=${{ secrets.TEST_MODE }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "OPENAI_MODEL_DEPLOYMENT=${{ secrets.OPENAI_MODEL_DEPLOYMENT }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "COHERE_API_KEY=${{ secrets.COHERE_API_KEY }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "COHERE_API_KEY_MULTI=${{ secrets.COHERE_API_KEY_MULTI }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
echo "COHERE_API_KEY_EN=${{ secrets.COHERE_API_KEY_EN }}" >> /home/${{ vars.VM_USERNAME }}/${{ github.repository }}.env.prod
- name: SSH to VM and Execute Docker-Compose Up
Expand Down

0 comments on commit 2854b47

Please sign in to comment.