From 863496ad850e3afc6f612ef84d90dcbc90d173d1 Mon Sep 17 00:00:00 2001 From: "Olusegun .O. ADELEKE" Date: Thu, 1 Aug 2024 20:34:42 +0100 Subject: [PATCH 1/2] Update pr-deploy.sh: fix directory creation Signed-off-by: Olusegun .O. ADELEKE --- pr-deploy.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pr-deploy.sh b/pr-deploy.sh index 50fa1b2d..d2503001 100644 --- a/pr-deploy.sh +++ b/pr-deploy.sh @@ -33,6 +33,9 @@ function kill_process_with_pid() { fi } +# Setup directory +mkdir -p ${DEPLOY_FOLDER}/ + # Initialize the JSON file for nohup if it doesn't exist if [ ! -f "$PID_FILE" ]; then echo "{}" > "$PID_FILE" @@ -61,8 +64,8 @@ fi # Free port FREE_PORT=$(python3 -c 'import socket; s = socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()') -# Setup directory -mkdir -p ${DEPLOY_FOLDER}/ +# # Setup directory +# mkdir -p ${DEPLOY_FOLDER}/ cd ${DEPLOY_FOLDER} rm -rf $PR_ID From 72faf0645cc7110b1383fe3fc6597f4b8336d862 Mon Sep 17 00:00:00 2001 From: "Olusegun .O. ADELEKE" Date: Thu, 1 Aug 2024 20:38:27 +0100 Subject: [PATCH 2/2] Update README.md pr-deploy version Signed-off-by: Olusegun .O. ADELEKE --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6b21f843..5c893e1b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This GitHub Action deploys pull requests in Docker containers, allowing you to t Pull request events trigger this action. It builds the Docker image for the pull request and deploys it in a new Docker container. This step calls the action tool in the workflow script ``` steps: -- uses: hngprojects/pr-deploy@v1.1.6 +- uses: hngprojects/pr-deploy@v1.1.7 ``` ## Inputs The following inputs are required to configure the GitHub Action. These inputs allow the action to connect to your server, specify the: @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Deploy PR - uses: hngprojects/pr-deploy@v1.1.6 + uses: hngprojects/pr-deploy@v1.1.7 with: server_host: ${{ secrets.SERVER_HOST }} server_username: ${{ secrets.SERVER_USERNAME }}