1+ @ -1,99 +0,0 @@
12# Sample workflow for building and deploying a Next.js site to GitHub Pages
23#
34# To get started with Next.js see: https://nextjs.org/docs/getting-started
@@ -7,7 +8,7 @@ name: Deploy Next.js site to Pages
78on :
89 # Runs on pushes targeting the default branch
910 push :
10- branches : ["main"]
11+ branches : [ "main" ]
1112
1213 # Allows you to run this workflow manually from the Actions tab
1314 workflow_dispatch :
@@ -55,12 +56,12 @@ jobs:
5556 cache : ${{ steps.detect-package-manager.outputs.manager }}
5657 - name : Setup Pages
5758 uses : actions/configure-pages@v5
58- with :
59- # Automatically inject basePath in your Next.js configuration file and disable
60- # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
61- #
62- # You may remove this line if you want to manage the configuration yourself.
63- static_site_generator : next
59+ # with:
60+ # # Automatically inject basePath in your Next.js configuration file and disable
61+ # # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
62+ # #
63+ # # You may remove this line if you want to manage the configuration yourself.
64+ # static_site_generator: next
6465 - name : Restore cache
6566 uses : actions/cache@v4
6667 with :
7576 run : ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
7677 - name : Build with Next.js
7778 run : ${{ steps.detect-package-manager.outputs.runner }} next build
79+ env :
80+ NEXT_PUBLIC_GA_ID : ${{ secrets.NEXT_PUBLIC_GA_ID }}
81+ ANOTHER_ENV_VAR : ${{ secrets.ANOTHER_ENV_VAR }}
82+ run : |
83+ echo "NEXT_PUBLIC_GA_ID is set"
84+ ${{ steps.detect-package-manager.outputs.runner }} next build
7885 - name : Upload artifact
7986 uses : actions/upload-pages-artifact@v3
8087 with :
0 commit comments