Skip to content

Commit 6e14ff4

Browse files
committed
fix: shift from pnpm to yarn
1 parent 75a1edb commit 6e14ff4

6 files changed

Lines changed: 3913 additions & 4763 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
1-
name: Deploy Next.js to GitHub Pages
1+
name: Deploy to GitHub Pages
22

33
on:
44
push:
55
branches:
66
- main
77

8+
permissions:
9+
contents: write
10+
811
jobs:
9-
build-and-deploy:
12+
deploy:
1013
runs-on: ubuntu-latest
14+
1115
steps:
12-
- name: Checkout repository
16+
- name: Checkout Repository
1317
uses: actions/checkout@v4
1418

15-
- name: Install pnpm
16-
uses: pnpm/action-setup@v4
17-
with:
18-
version: 9
19-
2019
- name: Setup Node.js
2120
uses: actions/setup-node@v4
2221
with:
23-
node-version: '20'
22+
node-version: 18
23+
cache: yarn
24+
25+
- name: Install Dependencies
26+
run: yarn install
2427

25-
- name: Install dependencies
26-
run: pnpm install
28+
- name: Build Project
29+
run: yarn build
2730

28-
- name: Build and export Next.js app
29-
run: pnpm run build
31+
- name: Add .nojekyll
32+
run: touch out/.nojekyll
3033

3134
- name: Deploy to GitHub Pages
32-
uses: peaceiris/actions-gh-pages@v4
35+
uses: JamesIves/github-pages-deploy-action@v4
3336
with:
34-
github_token: ${{ secrets.GITHUB_TOKEN }}
35-
publish_dir: ./out
36-
publish_branch: gh-pages
37-
force_orphan: true
37+
branch: gh-pages
38+
folder: out

next.config.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import type { NextConfig } from 'next';
22

3+
const isProd = process.env.NODE_ENV ==='production';
4+
5+
import type { NextConfig } from 'next';
6+
37
const nextConfig: NextConfig = {
4-
output: 'export',
5-
images: {
6-
unoptimized: true,
7-
},
8+
/* config options here */
9+
output: isProd ? 'export' : 'standalone',
10+
basePath: isProd ? '/Portfolio' : '',
11+
assetPrefix: isProd ? '/Portfolio/' : '',
12+
trailingSlash: true,
813
};
914

1015
export default nextConfig;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "new-portfolio",
33
"version": "0.1.0",
4+
"homepage": "https://roxylius.github.io/Portfolio/",
45
"private": true,
56
"scripts": {
67
"dev": "next dev",

0 commit comments

Comments
 (0)