This repository was archived by the owner on Aug 14, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,11 +56,7 @@ REPO_ID=$(curl -L \
5656 -H " Authorization: Bearer $GITHUB_TOKEN " \
5757 https://api.github.com/repos/${REPO_OWNER} /${REPO_NAME} | jq -r ' .id' )
5858
59- ls
60- pwd
6159chmod +x ${GITHUB_ACTION_PATH} /pr-deploy.sh
62- exit 0
63- ls /home/runner/work/_actions/hngprojects/pr-deploy/main/pr-deploy.sh
6460
6561# Make the pr-deploy.sh script executable.
6662
@@ -70,7 +66,7 @@ if [ "$PR_ACTION" == "opened" ]; then
7066fi
7167
7268# Copy the pr-deploy.sh script to the remote server.
73- sshpass -p " $SERVER_PASSWORD " scp -o StrictHostKeyChecking=no -P $SERVER_PORT . /pr-deploy.sh $SERVER_USERNAME @$SERVER_HOST :/srv/pr-deploy.sh
69+ sshpass -p " $SERVER_PASSWORD " scp -o StrictHostKeyChecking=no -P $SERVER_PORT ${GITHUB_ACTION_PATH} /pr-deploy.sh $SERVER_USERNAME @$SERVER_HOST :/srv/pr-deploy.sh
7470
7571# Run the pr-deploy.sh script on the remote server and capture the output from the remote script
7672REMOTE_OUTPUT=$( sshpass -p " $SERVER_PASSWORD " ssh -o StrictHostKeyChecking=no -p $SERVER_PORT $SERVER_USERNAME @$SERVER_HOST /srv/pr-deploy.sh $CONTEXT $DOCKERFILE $EXPOSED_PORT $REPO_URL $REPO_ID $GITHUB_HEAD_REF $PR_ACTION $PR_NUMBER $COMMENT_ID | tail -n 1)
You can’t perform that action at this time.
0 commit comments