Skip to content

UNFINISHED - setup nginx from the configuration file #22

UNFINISHED - setup nginx from the configuration file

UNFINISHED - setup nginx from the configuration file #22

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
# Create temporary Nginx config file
- name: Create temporary nginx config file
run: |
# Load environment variables from .env (already done by Dotenv Action)
echo "Substituting environment variables into nginx template"
envsubst '${PORT_PREFIX} ${GROUP_ID} ${DEV_POSTFIX}' < ./nginx_template.txt > temp_default.conf
- name: Check environment variables for Nginx
run: |
echo "PORT_PREFIX=${PORT_PREFIX}"
echo "GROUP_ID=${GROUP_ID}"
echo "DEV_POSTFIX=${DEV_POSTFIX}"
- name: Copy temporary file to correct place
run: cp -L temp_default.conf /etc/nginx/conf.d/default.conf
- name: Show nginx file
run: cat /etc/nginx/conf.d/default.conf