debug prod deployment
Some checks failed
Build, Push and Deploy / build-and-push (push) Successful in 2m29s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 8s
Build, Push and Deploy / deploy-staging (push) Successful in 27s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 0s
Some checks failed
Build, Push and Deploy / build-and-push (push) Successful in 2m29s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 8s
Build, Push and Deploy / deploy-staging (push) Successful in 27s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 0s
This commit is contained in:
@@ -118,6 +118,47 @@ jobs:
|
|||||||
if: gitea.event_name == 'workflow_dispatch' && gitea.event.inputs.deploy_to_production == 'yes'
|
if: gitea.event_name == 'workflow_dispatch' && gitea.event.inputs.deploy_to_production == 'yes'
|
||||||
environment: production
|
environment: production
|
||||||
steps:
|
steps:
|
||||||
|
# ============================================
|
||||||
|
# STEP 1: Setup SSH Key and Configuration
|
||||||
|
# ============================================
|
||||||
|
- name: Setup SSH Key and Config
|
||||||
|
run: |
|
||||||
|
echo "🔑 Setting up SSH authentication..."
|
||||||
|
|
||||||
|
# Create .ssh directory with proper permissions
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
chmod 700 ~/.ssh
|
||||||
|
|
||||||
|
# Add the private SSH key from secrets
|
||||||
|
# Make sure you've added PRODUCTION_SSH_KEY as a secret in your repository
|
||||||
|
echo "${{ secrets.PRODUCTION_SSH_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
# Alternative: If you're using a specific key file name, you can use:
|
||||||
|
# echo "${{ secrets.PRODUCTION_SSH_KEY }}" > ~/.ssh/kulakpos_prod_key
|
||||||
|
# chmod 600 ~/.ssh/kulakpos_prod_key
|
||||||
|
|
||||||
|
# Add the host key to known_hosts to avoid host key verification prompt
|
||||||
|
# Replace PRODUCTION_HOST_IP with your actual server IP/hostname
|
||||||
|
ssh-keyscan -H ${{ secrets.PRODUCTION_HOST }} >> ~/.ssh/known_hosts 2>/dev/null
|
||||||
|
|
||||||
|
# Alternative: If you want to use SSH config file
|
||||||
|
cat > ~/.ssh/config << EOF
|
||||||
|
Host kulakpos_prod
|
||||||
|
HostName ${{ secrets.PRODUCTION_HOST }}
|
||||||
|
User ${{ secrets.PRODUCTION_USER }}
|
||||||
|
Port ${{ secrets.PRODUCTION_PORT || 22 }}
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
StrictHostKeyChecking accept-new
|
||||||
|
UserKnownHostsFile ~/.ssh/known_hosts
|
||||||
|
ServerAliveInterval 60
|
||||||
|
ServerAliveCountMax 3
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod 600 ~/.ssh/config
|
||||||
|
|
||||||
|
echo "✅ SSH configuration complete"
|
||||||
|
|
||||||
- name: Debug SSH Configuration
|
- name: Debug SSH Configuration
|
||||||
run: |
|
run: |
|
||||||
echo "Current user: $(whoami)"
|
echo "Current user: $(whoami)"
|
||||||
@@ -126,6 +167,9 @@ jobs:
|
|||||||
echo "SSH config content:"
|
echo "SSH config content:"
|
||||||
cat $HOME/.ssh/config || echo "No SSH config found"
|
cat $HOME/.ssh/config || echo "No SSH config found"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "SSH key permissions:"
|
||||||
|
ls -la ~/.ssh/
|
||||||
|
echo ""
|
||||||
echo "Testing SSH connection:"
|
echo "Testing SSH connection:"
|
||||||
ssh -v kulakpos_prod echo "Connection successful" || echo "Connection failed"
|
ssh -v kulakpos_prod echo "Connection successful" || echo "Connection failed"
|
||||||
|
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -19,3 +19,4 @@ yarn-error.log
|
|||||||
/storage/framework/views/*
|
/storage/framework/views/*
|
||||||
/public/modules/*
|
/public/modules/*
|
||||||
.qodo
|
.qodo
|
||||||
|
.camel-jbang
|
||||||
Reference in New Issue
Block a user