From 2ecc5150c7e381bb4ae2c847723a37f52e5db227 Mon Sep 17 00:00:00 2001 From: siddheshraze Date: Fri, 23 Feb 2024 16:01:21 -0500 Subject: [PATCH] trying to manually create env vars instead of just creating a .env doesn't seem to be working. reverting back to just creating a .env and populating. --- ...-file-upload-system_forestgeo-livesite.yml | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/new-file-upload-system_forestgeo-livesite.yml b/.github/workflows/new-file-upload-system_forestgeo-livesite.yml index 09d4bccc..5f4294e7 100644 --- a/.github/workflows/new-file-upload-system_forestgeo-livesite.yml +++ b/.github/workflows/new-file-upload-system_forestgeo-livesite.yml @@ -12,18 +12,7 @@ on: jobs: build: runs-on: ubuntu-latest - environment: - name: 'development' - env: - AZURE_AD_CLIENT_SECRET: ${{ secrets.AZURE_AD_CLIENT_SECRET }} - AZURE_AD_CLIENT_ID: ${{ secrets.AZURE_AD_CLIENT_ID }} - AZURE_AD_TENANT_ID: ${{ secrets.AZURE_AD_TENANT_ID }} - NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} - AZURE_SQL_USER: ${{ secrets.AZURE_SQL_USER }} - AZURE_SQL_PASSWORD: ${{ secrets.AZURE_SQL_PASSWORD }} - AZURE_SQL_SERVER: ${{ secrets.AZURE_SQL_SERVER }} - AZURE_SQL_DATABASE: ${{ secrets.AZURE_SQL_DATABASE }} - + environment: development steps: - uses: actions/checkout@v4 @@ -32,6 +21,22 @@ jobs: with: node-version: '18.x' + - name: create frontend env file + run: | + touch frontend/.env + echo AZURE_AD_CLIENT_SECRET=${{ secrets.AZURE_AD_CLIENT_SECRET }} >> frontend/.env + echo AZURE_AD_CLIENT_ID=${{ secrets.AZURE_AD_CLIENT_ID }} >> frontend/.env + echo AZURE_AD_TENANT_ID=${{ secrets.AZURE_AD_TENANT_ID }} >> frontend/.env + echo NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }} >> frontend/.env + echo AZURE_SQL_USER=${{ secrets.AZURE_SQL_USER }} >> frontend/.env + echo AZURE_SQL_PASSWORD=${{ secrets.AZURE_SQL_PASSWORD }} >> frontend/.env + echo AZURE_SQL_SERVER=${{ secrets.AZURE_SQL_SERVER }} >> frontend/.env + echo AZURE_SQL_DATABASE=${{ secrets.AZURE_SQL_DATABASE }} >> frontend/.env + echo AZURE_SQL_PORT=${{ secrets.AZURE_SQL_PORT }} >> frontend/.env + echo AZURE_STORAGE_SAS_CONNECTION_STRING=${{ secrets.AZURE_STORAGE_SAS_CONNECTION_STRING }} >> frontend/.env + echo AZURE_SQL_SCHEMA=${{ secrets.AZURE_SQL_SCHEMA }} >> frontend/.env + echo AZURE_STORAGE_CONNECTION_STRING=${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} >> frontend/.env + # - name: Cache node modules # uses: actions/cache@v2 # with: @@ -62,15 +67,6 @@ jobs: environment: name: 'development' url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - env: - AZURE_AD_CLIENT_SECRET: ${{ secrets.AZURE_AD_CLIENT_SECRET }} - AZURE_AD_CLIENT_ID: ${{ secrets.AZURE_AD_CLIENT_ID }} - AZURE_AD_TENANT_ID: ${{ secrets.AZURE_AD_TENANT_ID }} - NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} - AZURE_SQL_USER: ${{ secrets.AZURE_SQL_USER }} - AZURE_SQL_PASSWORD: ${{ secrets.AZURE_SQL_PASSWORD }} - AZURE_SQL_SERVER: ${{ secrets.AZURE_SQL_SERVER }} - AZURE_SQL_DATABASE: ${{ secrets.AZURE_SQL_DATABASE }} steps: - name: Download artifact from build job