From 6781068a1fc9a437e1ffb256b5f17fbf7bfbadfa Mon Sep 17 00:00:00 2001 From: ManDeep Singh Date: Thu, 10 Oct 2024 10:45:39 +0000 Subject: [PATCH] Update node.js.yml --- .github/workflows/node.js.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3e61120..dc5aaa6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,6 +1,3 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - name: Node.js CI on: @@ -18,7 +15,6 @@ jobs: strategy: matrix: node-version: [18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v4 @@ -27,21 +23,21 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' - - name: display env variables - - env: - NEXT_PUBLIC_CONVEX_URL: ${{ vars.NEXT_PUBLIC_CONVEX_URL }} - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }} - CONVEX_DEPLOYMENT: ${{ secrets.CONVEX_DEPLOYMENT }} + - name: Display Environment Variables run: | echo "Convex var: $NEXT_PUBLIC_CONVEX_URL" echo "Clerk var: $NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY" - echo "Covex deployment: $CONVEX_DEPLOYMENT" - - name: create env file + echo "Convex deployment: $CONVEX_DEPLOYMENT" + env: + NEXT_PUBLIC_CONVEX_URL: ${{ vars.NEXT_PUBLIC_CONVEX_URL }} + NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }} + CONVEX_DEPLOYMENT: ${{ secrets.CONVEX_DEPLOYMENT }} + - name: Create .env file run: | touch .env - echo NEXT_PUBLIC_CONVEX_URL="https://youthful-seahorse-517.convex.cloud" >> .env - echo NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_YWxsb3dpbmctcXVldHphbC04MS5jbGVyay5hY2NvdW50cy5kZXYk >> .env - echo CONVEX_DEPLOYMENT=dev:youthful-seahorse-517 >> .env + echo NEXT_PUBLIC_CONVEX_URL=${{ vars.NEXT_PUBLIC_CONVEX_URL }} >> .env + echo NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }} >> .env + echo CONVEX_DEPLOYMENT=${{ secrets.CONVEX_DEPLOYMENT }} >> .env - run: npm ci - run: npm run build --if-present - run: npm test --if-present