Skip to content

Commit 84691bd

Browse files
committed
Merge
1 parent e217441 commit 84691bd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/nextjs.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,13 @@ jobs:
5252
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
5353
- name: Install dependencies
5454
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
55-
- name: Build with Next.js
56-
run: ${{ steps.detect-package-manager.outputs.runner }} next build
57-
- name: Static HTML export with Next.js
58-
run: ${{ steps.detect-package-manager.outputs.runner }} next export
55+
- name: Make .env file
56+
run: |
57+
echo NEXT_PUBLIC_BACKEND_URL=${{ vars.NEXT_PUBLIC_BACKEND_URL }} >> .env
58+
echo NEXT_PUBLIC_FRONTEND_URL=${{ vars.NEXT_PUBLIC_FRONTEND_URL }} >> .env
59+
echo NEXT_PUBLIC_GOOGLE_ANALYTICS_TAG_ID=${{ vars.NEXT_PUBLIC_GOOGLE_ANALYTICS_TAG_ID }} >> .env
60+
- name: Build and statically render nextjs with Next.js
61+
run: ${{ steps.detect-package-manager.outputs.manager }} run build
5962
- run: echo '' > ./out/_next/.nojekyll
6063
- name: Upload artifact
6164
uses: actions/upload-pages-artifact@v1

0 commit comments

Comments
 (0)