Fix YAML syntax error in CI/CD workflow
- Remove duplicated deployment script content - Fix env: section positioning - Correct YAML indentation and structure
This commit is contained in:
26
.github/workflows/ci-cd.yml
vendored
26
.github/workflows/ci-cd.yml
vendored
@@ -183,6 +183,8 @@ jobs:
|
||||
steps:
|
||||
- name: Deploy to production
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
env:
|
||||
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
with:
|
||||
host: ${{ secrets.PROD_HOST }}
|
||||
username: ${{ secrets.PROD_USERNAME }}
|
||||
@@ -213,29 +215,5 @@ jobs:
|
||||
# Collect static files
|
||||
docker-compose exec -T web python manage.py collectstatic --noinput
|
||||
|
||||
# Show container status
|
||||
docker-compose ps
|
||||
env:
|
||||
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
|
||||
# Copy production docker compose file
|
||||
cp deploy-production/docker-compose.prod.yml docker-compose.yml
|
||||
|
||||
# Stop containers
|
||||
docker-compose down
|
||||
|
||||
# Start containers with rebuild
|
||||
docker-compose up -d --build
|
||||
|
||||
# Wait for containers to be ready
|
||||
echo "Waiting for containers to start..."
|
||||
sleep 30
|
||||
|
||||
# Run migrations
|
||||
docker-compose exec -T web python manage.py migrate
|
||||
|
||||
# Collect static files
|
||||
docker-compose exec -T web python manage.py collectstatic --noinput
|
||||
|
||||
# Show container status
|
||||
docker-compose ps
|
||||
|
||||
Reference in New Issue
Block a user