diff --git a/.gitea/workflows/workflow.yaml b/.gitea/workflows/workflow.yaml index 5589e1b..7f15583 100644 --- a/.gitea/workflows/workflow.yaml +++ b/.gitea/workflows/workflow.yaml @@ -63,7 +63,7 @@ jobs: sync_repo_files: name: Sync repository files runs-on: ubuntu-latest - needs: create_remote_directory + needs: [create_remote_directory, prepare_deployment_vars] if: | (github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.merged == false) || github.ref == 'refs/heads/main' @@ -82,8 +82,8 @@ jobs: key: ${{ env.SSH_PRIVATE_KEY }} port: ${{ env.SSH_PORT }} source: "./" - # target: "${{ needs.prepare_deployment_vars.outputs.deploy_path }}" - target: "/tmp/app/main" + target: "${{ needs.prepare_deployment_vars.outputs.deploy_path }}" + #target: "/tmp/app/main" debug: true # The 'exclude' parameter is supported and should be kept # exclude: | @@ -94,7 +94,7 @@ jobs: run_docker_compose: name: Run docker-compose remotely runs-on: ubuntu-latest - needs: sync_repo_files + needs: [sync_repo_files, prepare_deployment_vars] if: | (github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.merged == false) || github.ref == 'refs/heads/main' @@ -116,12 +116,12 @@ jobs: chmod 644 ~/.ssh/known_hosts - 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: name: Cleanup MR environment runs-on: ubuntu-latest - needs: prepare_deployment_vars + needs: [prepare_deployment_vars, prepare_deployment_vars] if: | github.event_name == 'pull_request' && (github.event.action == 'closed' || github.event.pull_request.merged == true)