Skip to content

Commit 2bc18d3

Browse files
committed
added ci config
1 parent dbc3cfb commit 2bc18d3

File tree

2 files changed

+62
-2
lines changed

2 files changed

+62
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: GitHub Pages deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Install Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
20+
- uses: pnpm/action-setup@v4
21+
name: Install pnpm
22+
with:
23+
version: 8
24+
run_install: false
25+
26+
- name: Get pnpm store directory
27+
shell: bash
28+
run: |
29+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
30+
31+
- uses: actions/cache@v4
32+
name: Setup pnpm cache
33+
with:
34+
path: ${{ env.STORE_PATH }}
35+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-store-
38+
39+
- name: Installing my packages
40+
run: pnpm i
41+
42+
- name: Extract repository name
43+
run: echo "BASE_PATH=/$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)" >> $GITHUB_ENV
44+
45+
- name: Build my App
46+
run: pnpm run build && touch ./out/.nojekyll
47+
48+
- name: Deploy 🚀
49+
uses: JamesIves/[email protected]
50+
with:
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
branch: public # The branch the action should deploy to.
53+
folder: out # The folder the action should deploy to.

next.config.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
/** @type {import('next').NextConfig} */
2-
const nextConfig = {};
2+
const nextConfig = {
3+
output: "export",
4+
basePath: "/neet-result",
5+
trailingSlash: true,
6+
images: {
7+
unoptimized: true,
8+
},
9+
};
310

4-
export default nextConfig;
11+
export default nextConfig;

0 commit comments

Comments
 (0)