Skip to content

Commit f785aa7

Browse files
authored
Merge pull request #23 from getlocalcert/wdhdev-patch-1
deploy using github pages
2 parents 787fc96 + ea3a25f commit f785aa7

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
name: Build
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: pnpm/action-setup@v4
27+
with:
28+
version: 10
29+
run_install: false
30+
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: 22
34+
cache: 'pnpm'
35+
36+
- run: pnpm install
37+
38+
- id: setup_pages
39+
uses: actions/configure-pages@v5
40+
41+
- uses: actions/cache@v4
42+
with:
43+
path: |
44+
.next/cache
45+
# Generate a new cache whenever packages or source files change.
46+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
47+
# If source files changed but packages didn't, rebuild from a prior cache.
48+
restore-keys: |
49+
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
50+
51+
- run: pnpm run build
52+
env:
53+
PAGES_BASE_PATH: ${{ steps.setup_pages.outputs.base_path }}
54+
55+
- uses: actions/upload-pages-artifact@v3
56+
with:
57+
path: ./out
58+
59+
deploy:
60+
name: Deploy
61+
environment:
62+
name: github-pages
63+
url: ${{ steps.deployment.outputs.page_url }}
64+
runs-on: ubuntu-latest
65+
needs: build
66+
steps:
67+
- id: deployment
68+
uses: actions/deploy-pages@v4

next.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4-
output: "standalone"
4+
basePath: "/",
5+
output: "export"
56
};
67

78
export default nextConfig;

0 commit comments

Comments
 (0)