Skip to content

Second commit

Second commit #1

name: Deploy nginx configuration to TDT4242 server
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy-nginx:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Dotenv Action
uses: falti/dotenv-action@v1.1.4
with:
export-variables: true
keys-case: bypass
- name: Deploy nginx configuration file
run: |
sudo cp ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
sudo systemctl reload nginx
- name: Show nginx file
run: |
cat /etc/nginx/conf.d/default.conf
sudo nginx -t
sudo systemctl status nginx
echo "Nginx is running correctly"