From aa765f511d4a93b303852d967f52c5f17cac279d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Haugen?= Date: Wed, 2 Apr 2025 18:05:34 +0200 Subject: [PATCH] Remove duplicate and unfinished nginx workflows --- .github/workflows/nginx-deploy.yml | 34 ---------------------- .github/workflows/update_primary_nginx.yml | 31 -------------------- 2 files changed, 65 deletions(-) delete mode 100644 .github/workflows/nginx-deploy.yml delete mode 100644 .github/workflows/update_primary_nginx.yml diff --git a/.github/workflows/nginx-deploy.yml b/.github/workflows/nginx-deploy.yml deleted file mode 100644 index 6468e94..0000000 --- a/.github/workflows/nginx-deploy.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Deploy Nginx Configuration - -on: - push: - branches: - - main - paths: - - 'nginx_securefit.conf' - - '.github/workflows/nginx-deploy.yml' - -jobs: - deploy-nginx: - runs-on: self-hosted - steps: - - name: Configure Git - run: | - git config --global url."https://oauth2:${GITLAB_TOKEN}@git.ntnu.no".insteadOf "https://git.ntnu.no" - env: - GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} - - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Deploy nginx configuration - run: | - sudo cp -v ./nginx_securefit.conf /etc/nginx/conf.d/nginx_securefit.conf - sudo nginx -t - sudo systemctl reload nginx - - - name: Verify nginx configuration - run: | - sleep 5 # Give nginx time to reload - curl -I http://tdt4242-26.idi.ntnu.no || true # Use the actual server name - sudo systemctl status nginx \ No newline at end of file diff --git a/.github/workflows/update_primary_nginx.yml b/.github/workflows/update_primary_nginx.yml deleted file mode 100644 index 9733e17..0000000 --- a/.github/workflows/update_primary_nginx.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: UNFINISHED - setup nginx from the configuration file - -on: - workflow_dispatch: - -jobs: - deploy: - 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: Check environment variables - run: env - - #Doesn't work properly, envsubst replaces all instances of $variable and ${variable}, but we want to keep e.g., $host as nginx variables - #- 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: Copy temporary file to correct place - run: cp temp_default.conf /etc/nginx/conf.d/default.conf - - - name: Show nginx file - run: cat /etc/nginx/conf.d/default.conf