Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Destiny Saturday  <[email protected]>
  • Loading branch information
ThePrimeJnr authored Jul 31, 2024
1 parent acfe238 commit 2604ad9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ REPO_ID=$(curl -L \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME} | jq -r '.id')

ls
pwd
chmod +x ${GITHUB_ACTION_PATH}/pr-deploy.sh
exit 0
ls /home/runner/work/_actions/hngprojects/pr-deploy/main/pr-deploy.sh

# Make the pr-deploy.sh script executable.

Expand All @@ -70,7 +66,7 @@ if [ "$PR_ACTION" == "opened" ]; then
fi

# Copy the pr-deploy.sh script to the remote server.
sshpass -p "$SERVER_PASSWORD" scp -o StrictHostKeyChecking=no -P $SERVER_PORT ./pr-deploy.sh $SERVER_USERNAME@$SERVER_HOST:/srv/pr-deploy.sh
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

# Run the pr-deploy.sh script on the remote server and capture the output from the remote script
REMOTE_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)
Expand Down

0 comments on commit 2604ad9

Please sign in to comment.