diff --git a/.github/workflows/update_primary_nginx.yml b/.github/workflows/update_primary_nginx.yml index 9733e17..dad9f75 100644 --- a/.github/workflows/update_primary_nginx.yml +++ b/.github/workflows/update_primary_nginx.yml @@ -1,4 +1,4 @@ -name: UNFINISHED - setup nginx from the configuration file +name: Setup nginx from the configuration file on: workflow_dispatch: @@ -23,6 +23,11 @@ jobs: #- name: Create temporary nginx config file # run: envsubst < ./nginx_template.txt > temp_default.conf # Maybe look at https://www.baeldung.com/linux/envsubst-command to get an idea + + # Fixed envsubst code + - name: Create temporary nginx config file + run: envsubst "$(printf '${%s} ' $(env | cut -d= -f1))" < ./nginx_template.txt > temp_default.conf + - name: Copy temporary file to correct place run: cp temp_default.conf /etc/nginx/conf.d/default.conf