Fix hardcoding

This commit is contained in:
2025-10-21 21:53:07 +02:00
parent 86e14ed18b
commit 3eedb52efd

View File

@@ -63,7 +63,7 @@ jobs:
sync_repo_files: sync_repo_files:
name: Sync repository files name: Sync repository files
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: create_remote_directory needs: [create_remote_directory, prepare_deployment_vars]
if: | if: |
(github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.merged == false) (github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.merged == false)
|| github.ref == 'refs/heads/main' || github.ref == 'refs/heads/main'
@@ -82,8 +82,8 @@ jobs:
key: ${{ env.SSH_PRIVATE_KEY }} key: ${{ env.SSH_PRIVATE_KEY }}
port: ${{ env.SSH_PORT }} port: ${{ env.SSH_PORT }}
source: "./" source: "./"
# target: "${{ needs.prepare_deployment_vars.outputs.deploy_path }}" target: "${{ needs.prepare_deployment_vars.outputs.deploy_path }}"
target: "/tmp/app/main" #target: "/tmp/app/main"
debug: true debug: true
# The 'exclude' parameter is supported and should be kept # The 'exclude' parameter is supported and should be kept
# exclude: | # exclude: |
@@ -94,7 +94,7 @@ jobs:
run_docker_compose: run_docker_compose:
name: Run docker-compose remotely name: Run docker-compose remotely
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: sync_repo_files needs: [sync_repo_files, prepare_deployment_vars]
if: | if: |
(github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.merged == false) (github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.merged == false)
|| github.ref == 'refs/heads/main' || github.ref == 'refs/heads/main'
@@ -116,12 +116,12 @@ jobs:
chmod 644 ~/.ssh/known_hosts chmod 644 ~/.ssh/known_hosts
- name: Run docker-compose on remote host - name: Run docker-compose on remote host
run: ssh -p "$SSH_PORT" $SSH_USER@$SSH_HOST "cd /tmp/app/main && docker-compose up -d --build" run: ssh -p "$SSH_PORT" $SSH_USER@$SSH_HOST "cd ${{ needs.prepare_deployment_vars.outputs.deploy_path }} && docker-compose up -d --build"
cleanup_mr_environment: cleanup_mr_environment:
name: Cleanup MR environment name: Cleanup MR environment
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: prepare_deployment_vars needs: [prepare_deployment_vars, prepare_deployment_vars]
if: | if: |
github.event_name == 'pull_request' && github.event_name == 'pull_request' &&
(github.event.action == 'closed' || github.event.pull_request.merged == true) (github.event.action == 'closed' || github.event.pull_request.merged == true)