From 974f080f327a22ebcdb6d1275477c43a04fb5ace Mon Sep 17 00:00:00 2001
From: Fabrice Normandin <normandf@mila.quebec>
Date: Wed, 3 Jul 2024 20:41:38 +0000
Subject: [PATCH] Copy the job script to the cluster before running

Signed-off-by: Fabrice Normandin <normandf@mila.quebec>
---
 .github/workflows/build.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4787ed09..043de727 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -95,8 +95,11 @@ jobs:
     needs: [local_integration_tests]
     runs-on: self-hosted
     steps:
+      - name: Copy job script to the cluster
+        run: scp actions-runner-job.sh mila
+
       - name: Launch Slurm Actions Runner
-        run: ssh mila "sbatch ~/repos/ResearchTemplate/actions-runner-job.sh"
+        run: ssh mila sbatch actions-runner-job.sh
 
   slurm_integration_tests:
     needs: [local_integration_tests]