test one scp command
Some checks failed
Gitea Action Maven build / build (push) Successful in 47s
Gitea Action Maven build / deploy (push) Failing after 5s

This commit is contained in:
Eduard Kuksa 2025-02-13 22:40:00 +07:00
parent 9683b8a441
commit 9a159b5ab7

View File

@ -63,17 +63,14 @@ jobs:
known_hosts: ${{ secrets.KNOWN_HOSTS }} known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Deploy to Local Server - name: Deploy to Local Server
run: | run: |
scp artifact/target/*.jar ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ vars.DEPLOY_PATH }} scp -r artifact/ ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ vars.DEPLOY_PATH }}
scp artifact/Dockerfile ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ vars.DEPLOY_PATH }} # scp artifact/target/*.jar ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ vars.DEPLOY_PATH }}
scp artifact/docker-compose.yml ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ vars.DEPLOY_PATH }} # scp artifact/Dockerfile ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ vars.DEPLOY_PATH }}
# scp artifact/docker-compose.yml ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ vars.DEPLOY_PATH }}
- name: Build and Run Docker Image with Docker Compose - name: Build and Run Docker Image with Docker Compose
run: | run: |
ssh ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }} << EOF ssh ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }} << EOF
cd ${{ vars.DEPLOY_PATH }} cd ${{ vars.DEPLOY_PATH }}
ls
docker compose down docker compose down
docker compose up -d --build docker compose up -d --build
EOF EOF
# docker compose build && docker compose up -d"