fix: poor indentation

This commit is contained in:
2025-09-14 10:22:40 +03:00
parent 70550d0c98
commit 27b674c821

View File

@@ -45,54 +45,54 @@ runs:
# Optional: Set timeout for the entire action # Optional: Set timeout for the entire action
# timeout-minutes: 10 # timeout-minutes: 10
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up SSH config - name: Set up SSH config
run: | run: |
mkdir -p ~/.ssh mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts chmod 644 ~/.ssh/known_hosts
# SSH config file # SSH config file
echo "Host ${REMOTE_HOST}" > ~/.ssh/config echo "Host ${REMOTE_HOST}" > ~/.ssh/config
echo " HostName ${REMOTE_HOST}" >> ~/.ssh/config echo " HostName ${REMOTE_HOST}" >> ~/.ssh/config
echo " User ${REMOTE_USER}" >> ~/.ssh/config echo " User ${REMOTE_USER}" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
echo " StrictHostKeyChecking yes" >> ~/.ssh/config echo " StrictHostKeyChecking yes" >> ~/.ssh/config
echo " UserKnownHostsFile ~/.ssh/known_hosts" >> ~/.ssh/config echo " UserKnownHostsFile ~/.ssh/known_hosts" >> ~/.ssh/config
- name: Copy docker-compose file to remote server - name: Copy docker-compose file to remote server
run: | run: |
mkdir -p "$(dirname "${DEPLOYMENT_PATH}")" mkdir -p "$(dirname "${DEPLOYMENT_PATH}")"
scp -o StrictHostKeyChecking=yes \ scp -o StrictHostKeyChecking=yes \
-o UserKnownHostsFile= ~/.ssh/known_hosts \ -o UserKnownHostsFile= ~/.ssh/known_hosts \
-i ~/.ssh/id_rsa \ -i ~/.ssh/id_rsa \
"${DOCKER_COMPOSE_PATH}" \ "${DOCKER_COMPOSE_PATH}" \
"${REMOTE_USER}@${REMOTE_HOST}:${DEPLOYMENT_PATH}" "${REMOTE_USER}@${REMOTE_HOST}:${DEPLOYMENT_PATH}"
shell: bash shell: bash
- name: Deploy services via SSH - name: Deploy services via SSH
run: | run: |
ssh -o StrictHostKeyChecking=yes \ ssh -o StrictHostKeyChecking=yes \
-o UserKnownHostsFile= ~/.ssh/known_hosts \ -o UserKnownHostsFile= ~/.ssh/known_hosts \
-i ~/.ssh/id_rsa \ -i ~/.ssh/id_rsa \
"${REMOTE_USER}@${REMOTE_HOST}" \ "${REMOTE_USER}@${REMOTE_HOST}" \
"docker-compose -f ${DEPLOYMENT_PATH} up -d --timeout ${TIMEOUT}" "docker-compose -f ${DEPLOYMENT_PATH} up -d --timeout ${TIMEOUT}"
shell: bash shell: bash
- name: Verify services are running - name: Verify services are running
run: | run: |
ssh -o StrictHostKeyChecking=yes \ ssh -o StrictHostKeyChecking=yes \
-o UserKnownHostsFile= ~/.ssh/known_hosts \ -o UserKnownHostsFile= ~/.ssh/known_hosts \
-i ~/.ssh/id_rsa \ -i ~/.ssh/id_rsa \
"${REMOTE_USER}@${REMOTE_HOST}" \ "${REMOTE_USER}@${REMOTE_HOST}" \
"docker-compose -f ${DEPLOYMENT_PATH} ps" "docker-compose -f ${DEPLOYMENT_PATH} ps"
shell: bash shell: bash
- name: Final success message - name: Final success message
run: echo "✅ Docker Compose deployed successfully on ${REMOTE_HOST}" run: echo "✅ Docker Compose deployed successfully on ${REMOTE_HOST}"