Skip to content

Commit

Permalink
Third commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritzs committed Mar 3, 2025
1 parent f7df476 commit d3940fc
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/update_primary_nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,29 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Dotenv Action

# Setting up env variables
- name: Env variables
uses: falti/dotenv-action@v1.1.4
with:
export-variables: true
keys-case: bypass

# Copying nginx configuration file to the server
- name: Deploy nginx configuration file
run: |
sudo cp ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
sudo cp ./nginx.conf /etc/nginx/conf.d/nginx.conf
# Restarting nginx service
- name: Restart nginx service
run: |
sudo systemctl reload nginx
- name: Show nginx file
# Test the nginx configuration
- name: Test nginx configuration
run: |
sudo nginx -t
- name: Show deployed configuration
run: |
cat /etc/nginx/conf.d/default.conf
sudo nginx -t
sudo systemctl status nginx
echo "Nginx is running correctly"
cat /etc/nginx/conf.d/nginx.conf

0 comments on commit d3940fc

Please sign in to comment.