debug prod deployment
Some checks failed
Build, Push and Deploy / build-and-push (push) Successful in 2m27s
Build, Push and Deploy / deploy-staging (push) Successful in 28s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
eko
2026-03-29 09:31:43 +07:00
parent ae4e9f9491
commit b1edd2e0f5

View File

@@ -125,40 +125,29 @@ jobs:
run: | run: |
echo "🔑 Setting up SSH authentication..." echo "🔑 Setting up SSH authentication..."
# Create .ssh directory with proper permissions
mkdir -p ~/.ssh mkdir -p ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh
# Add the private SSH key from secrets # Decode the base64-encoded SSH key
# Make sure you've added PRODUCTION_SSH_KEY as a secret in your repository echo "${{ secrets.PRODUCTION_SSH_KEY_BASE64 }}" | base64 -d > ~/.ssh/id_rsa
echo "${{ secrets.PRODUCTION_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa
# Alternative: If you're using a specific key file name, you can use: # Add host to known_hosts
# echo "${{ secrets.PRODUCTION_SSH_KEY }}" > ~/.ssh/kulakpos_prod_key ssh-keyscan -H ${{ secrets.PRODUCTION_HOST }} >> ~/.ssh/known_hosts 2>/dev/null || true
# chmod 600 ~/.ssh/kulakpos_prod_key
# Add the host key to known_hosts to avoid host key verification prompt # Create SSH config
# 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 cat > ~/.ssh/config << EOF
Host kulakpos_prod Host kulakpos_prod
HostName ${{ secrets.PRODUCTION_HOST }} HostName ${{ secrets.PRODUCTION_HOST }}
User ${{ secrets.PRODUCTION_USER }} User ${{ secrets.PRODUCTION_USER }}
Port ${{ secrets.PRODUCTION_PORT || 22 }}
IdentityFile ~/.ssh/id_rsa IdentityFile ~/.ssh/id_rsa
StrictHostKeyChecking accept-new StrictHostKeyChecking accept-new
UserKnownHostsFile ~/.ssh/known_hosts
ServerAliveInterval 60
ServerAliveCountMax 3
EOF EOF
chmod 600 ~/.ssh/config chmod 600 ~/.ssh/config
echo "✅ SSH configuration complete" echo "✅ SSH configuration complete"
- name: Debug SSH Configuration - name: Debug SSH Configuration
run: | run: |
echo "Current user: $(whoami)" echo "Current user: $(whoami)"