This commit is contained in:
@@ -39,7 +39,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create environment file
|
- name: Create environment file
|
||||||
run: |
|
run: |
|
||||||
cat > ${{ inputs.environment_file }} << EOF
|
cat > .env << EOF
|
||||||
IMAGE_URL='git.klemp.dev/tech-reborn/phoenix:feature-branch-deployments'
|
IMAGE_URL='git.klemp.dev/tech-reborn/phoenix:feature-branch-deployments'
|
||||||
URL='${{ steps.branch_name.outputs.branch_name }}.phoenix.klemp.local'
|
URL='${{ steps.branch_name.outputs.branch_name }}.phoenix.klemp.local'
|
||||||
REGISTRY=git.klemp.dev
|
REGISTRY=git.klemp.dev
|
||||||
@@ -58,21 +58,21 @@ jobs:
|
|||||||
|
|
||||||
- name: Stop existing deployment
|
- name: Stop existing deployment
|
||||||
run: |
|
run: |
|
||||||
docker-compose --context deploy_target -f ${{ inputs.compose_file }} -p ${{ inputs.project_name }} down --remove-orphans || true
|
docker-compose --context deploy_target -f docker-compose.yml -p ${{ steps.branch_name.outputs.branch_name }} down --remove-orphans || true
|
||||||
|
|
||||||
- name: Pull latest images
|
- name: Pull latest images
|
||||||
run: |
|
run: |
|
||||||
docker-compose --context deploy_target -f ${{ inputs.compose_file }} -p ${{ inputs.project_name }} pull
|
docker-compose --context deploy_target -f docker-compose.yml -p ${{ steps.branch_name.outputs.branch_name }} pull
|
||||||
|
|
||||||
- name: Deploy with Docker Compose
|
- name: Deploy with Docker Compose
|
||||||
id: deploy
|
id: deploy
|
||||||
run: |
|
run: |
|
||||||
docker-compose --context deploy_target -f ${{ inputs.compose_file }} -p ${{ inputs.project_name }} up -d
|
docker-compose --context deploy_target -f docker-compose.yml -p ${{ steps.branch_name.outputs.branch_name }} up -d
|
||||||
|
|
||||||
echo "Waiting for services to start..."
|
echo "Waiting for services to start..."
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
CONTAINERS=$(docker-compose --context deploy_target -f ${{ inputs.compose_file }} -p ${{ inputs.project_name }} ps --services | tr '\n' ',' | sed 's/,$//')
|
CONTAINERS=$(docker-compose --context deploy_target -f docker-compose.yml -p ${{ steps.branch_name.outputs.branch_name }} ps --services | tr '\n' ',' | sed 's/,$//')
|
||||||
echo "containers=$CONTAINERS" >> $GITHUB_OUTPUT
|
echo "containers=$CONTAINERS" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
echo "✅ Deployment completed successfully!"
|
echo "✅ Deployment completed successfully!"
|
||||||
@@ -82,5 +82,5 @@ jobs:
|
|||||||
- name: Show deployment status
|
- name: Show deployment status
|
||||||
run: |
|
run: |
|
||||||
echo "=== Deployment Status ==="
|
echo "=== Deployment Status ==="
|
||||||
docker-compose --context deploy_target -f ${{ inputs.compose_file }} -p ${{ inputs.project_name }} ps
|
docker-compose --context deploy_target -f docker-compose.yml -p ${{ steps.branch_name.outputs.branch_name }} ps
|
||||||
echo "========================="
|
echo "========================="
|
||||||
|
|||||||
Reference in New Issue
Block a user