Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritzs committed Mar 4, 2025
1 parent ec07072 commit 453109f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/update_primary_nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,29 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Load environment variables
run: |
export $(grep -v '^#' .env | xargs)
printenv | grep PORT_PREFIX # Debugging step to see if they are loaded
- name: Set up environment variables
uses: falti/dotenv-action@v1.1.4
with:
export-variables: true
keys-case: bypass

- name: Check environment variables
run: env

- name: Replace environment variables in Nginx config
# Copying nginx configuration file to the server
- name: Deploy nginx configuration file
run: |
envsubst < nginx.conf.template > nginx.conf
sudo cp ./nginx_secfit.conf /etc/nginx/conf.d/nginx.conf
# Test the nginx configuration
- name: Test nginx configuration file
run: |
sudo nginx -t
# Copying nginx configuration file to the server
- name: Deploy nginx configuration file
run: |
sudo cp ./nginx_secfit.conf /etc/nginx/conf.d/nginx.conf
# Restarting nginx service
- name: Restart nginx service
run: |
sudo systemctl reload nginx
sudo systemctl restart nginx
- name: Show deployed configuration
run: |
Expand Down

0 comments on commit 453109f

Please sign in to comment.