Skip to content

Commit 420f329

Browse files
authored
ci(build): re-enable next build action
Signed-off-by: Rachel Yordán <rachelyordan@gmail.com>
1 parent 42884fe commit 420f329

File tree

1 file changed

+22
-27
lines changed

1 file changed

+22
-27
lines changed

.github/workflows/nextjs.yml

+22-27
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ jobs:
2929
build:
3030
runs-on: ubuntu-latest
3131
steps:
32+
3233
- name: Checkout 🛎️
33-
uses: actions/checkout@v4.1.3
34+
uses: actions/checkout@v4
35+
3436
- name: Detect package manager
3537
id: detect-package-manager
3638
run: |
@@ -48,21 +50,18 @@ jobs:
4850
echo "Unable to determine packager manager"
4951
exit 1
5052
fi
53+
5154
- name: Setup Node
52-
uses: actions/setup-node@v3
55+
uses: actions/setup-node@v4
5356
with:
54-
node-version: "20"
57+
node-version: "lts/*"
5558
cache: ${{ steps.detect-package-manager.outputs.manager }}
59+
5660
- name: Setup Pages
57-
uses: actions/configure-pages@v3
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
61+
uses: actions/configure-pages@v4
62+
6463
- name: Restore cache
65-
uses: actions/cache@v3
64+
uses: actions/cache@v4
6665
with:
6766
path: |
6867
.next/cache
@@ -71,18 +70,19 @@ jobs:
7170
# If source files changed but packages didn't, rebuild from a prior cache.
7271
restore-keys: |
7372
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
73+
7474
- name: Install dependencies
7575
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
76+
7677
- name: Build with Next.js
77-
run: ${{ steps.detect-package-manager.outputs.runner }} build && touch ./out/.nojekyll
78+
run: ${{ steps.detect-package-manager.outputs.runner }} next build
7879
env:
7980
NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN: ${{ secrets.NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN }}
80-
# - name: Static HTML export with Next.js
81-
# run: ${{ steps.detect-package-manager.outputs.runner }} next export
82-
# - name: Upload artifact
83-
# uses: actions/upload-pages-artifact@v4
84-
# with:
85-
# path: ./out
81+
82+
- name: Upload artifact
83+
uses: actions/upload-pages-artifact@v4
84+
with:
85+
path: ./out
8686

8787
# Deployment job
8888
deploy:
@@ -92,12 +92,7 @@ jobs:
9292
runs-on: ubuntu-latest
9393
needs: build
9494
steps:
95-
# - name: Deploy to GitHub Pages
96-
# id: deployment
97-
# uses: actions/deploy-pages@v4
98-
- name: Deploy 🚀
99-
uses: JamesIves/github-pages-deploy-action@v4.6.0
100-
with:
101-
token: ${{ secrets.GITHUB_TOKEN }}
102-
branch: main
103-
folder: out
95+
96+
- name: Deploy to GitHub Pages 🚀
97+
id: deployment
98+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)