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 }} 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