Skip to content

Commit

Permalink
Update update_primary_nginx.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
amrevill authored and GitHub Enterprise committed Mar 6, 2025
1 parent 8f48c7c commit 8359a5b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/update_primary_nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,18 @@ 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

- name: Create temporary nginx config file
run: envsubst '$REPLACE_ME $ANOTHER_VAR' < ./nginx_template.txt > temp_default.conf

- name: Copy temporary file to correct place
run: cp temp_default.conf /etc/nginx/conf.d/default.conf
run: sudo cp temp_default.conf /etc/nginx/conf.d/default.conf
#added sudo here

- name: Show nginx file
run: cat /etc/nginx/conf.d/default.conf

- name: Test NGINX Configuration
run: sudo nginx -t

- name: Restart NGINX
run: sudo systemctl reload nginx

0 comments on commit 8359a5b

Please sign in to comment.