From c4ddf85c405a39cd6d7c319dc9174130faeedd1a Mon Sep 17 00:00:00 2001 From: Sander Johansen Date: Wed, 5 Mar 2025 09:28:02 +0100 Subject: [PATCH] Updated the update_primary_nginx.yml. --- .github/workflows/update_primary_nginx.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/update_primary_nginx.yml b/.github/workflows/update_primary_nginx.yml index 824d2bd..6869729 100644 --- a/.github/workflows/update_primary_nginx.yml +++ b/.github/workflows/update_primary_nginx.yml @@ -24,22 +24,25 @@ jobs: run: env - name: Generate Nginx Config with Environment Variables - run: envsubst '${PROD_PORT_PREFIX} ${DEV_PORT_PREFIX} ${STAG_PORT_PREFIX} ${GATEWAY_POSTFIX}' < nginx_template.txt > nginx_securefit.conf + run: | + envsubst '${PROD_PORT_PREFIX} ${DEV_PORT_PREFIX} ${STAG_PORT_PREFIX} ${GATEWAY_POSTFIX}' < nginx_template.txt > nginx_securefit.conf - name: Show Generated Nginx Config (Before Deploy) - run: cat nginx_securefit.conf - - - name: Print Current User - run: whoami + run: | + cat nginx_securefit.conf - name: Copy Nginx Config to Server - run: sudo cp nginx_securefit.conf /etc/nginx/conf.d/nginx_securefit.conf + run: | + sudo cp ./nginx_securefit.conf /etc/nginx/conf.d/nginx_securefit.conf - name: Show Deployed Nginx Config - run: cat /etc/nginx/conf.d/nginx_securefit.conf + run: | + cat /etc/nginx/conf.d/nginx_securefit.conf - name: Restart Nginx - run: sudo systemctl reload nginx + run: | + sudo systemctl reload nginx - name: Verify Nginx Config - run: sudo nginx -t \ No newline at end of file + run: | + sudo nginx -t \ No newline at end of file