diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0743079..c58587a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,18 +32,15 @@ jobs: - name: Set up OpenSSL run: sudo apt-get install -y openssl - - name: Encrypt .env file + - name: Encrypt env file run: | - openssl aes-256-cbc -salt -in ./production_build/.env -out .env.enc -k ${{ secrets.ENCRYPTION_KEY }} + openssl aes-256-cbc -salt -in ./production_build/env -out env.enc -k ${{ secrets.ENCRYPTION_KEY }} - - name: ls - run: ls production_build/ - - - name: Upload .env file + - name: Upload env file uses: actions/upload-artifact@v4 with: name: encrypted-env - path: .env.enc + path: env.enc build: runs-on: ubuntu-latest @@ -68,15 +65,15 @@ jobs: with: node-version: "20" - - name: Download .env file + - name: Download env file uses: actions/download-artifact@v4 with: name: encrypted-env path: . - - name: Decrypt .env file + - name: Decrypt env file run: | - openssl aes-256-cbc -d -in .env.enc -out .env -k ${{ secrets.ENCRYPTION_KEY }} + openssl aes-256-cbc -d -in env.enc -out .env -k ${{ secrets.ENCRYPTION_KEY }} - name: Install dependencies run: npm install diff --git a/production_build/construct_env.py b/production_build/construct_env.py index 4fbca73..183f9ce 100644 --- a/production_build/construct_env.py +++ b/production_build/construct_env.py @@ -5,7 +5,7 @@ now = datetime.datetime.now(datetime.timezone(offset, name='МСК')) formatted_date = now.strftime("%H:%M:%S %d.%m.%Y") -with open('production_build/.env', 'w') as env: +with open('production_build/env', 'w') as env: env.write(f'NEXT_PUBLIC_API_URL={os.getenv("NEXT_PUBLIC_API_URL")}\n') env.write( f'NEXT_PUBLIC_GLOBAL_API_URL={os.getenv("NEXT_PUBLIC_GLOBAL_API_URL")}\n')