From 6d10649834646315a1ce906a9e6c80f9940f9bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauritz=20Skog=C3=B8y?= Date: Mon, 3 Mar 2025 17:43:08 +0100 Subject: [PATCH] Attempted fix --- .github/workflows/update_primary_nginx.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update_primary_nginx.yml b/.github/workflows/update_primary_nginx.yml index 8f88b91..532846d 100644 --- a/.github/workflows/update_primary_nginx.yml +++ b/.github/workflows/update_primary_nginx.yml @@ -21,21 +21,24 @@ jobs: export-variables: true keys-case: bypass + # Test the nginx configuration + - name: Test nginx configuration + run: | + sudo nginx -t + # Copying nginx configuration file to the server - name: Deploy nginx configuration file run: | - sudo cp ./nginx/nginx.conf /etc/nginx/conf.d/nginx.conf + sudo cp ./nginx/nginx.conf /etc/nginx/nginx.conf # Main config + sudo cp ./nginx/nginx.conf /etc/nginx/conf.d/nginx.conf # Server block (if needed) + sudo chown root:root /etc/nginx/nginx.conf + sudo chmod 644 /etc/nginx/nginx.conf # Restarting nginx service - name: Restart nginx service run: | sudo systemctl reload nginx - # Test the nginx configuration - - name: Test nginx configuration - run: | - sudo nginx -t - - name: Show deployed configuration run: | cat /etc/nginx/conf.d/nginx.conf