Skip to content

Commit 9bc8aff

Browse files
committed
mod: fix bug deployment
1 parent cc204a3 commit 9bc8aff

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/deploy-pages.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- ".github/workflows/deploy-pages.yml"
9+
- "pitch-deck/**"
710
workflow_dispatch:
811

912
permissions:
@@ -29,7 +32,7 @@ jobs:
2932
- name: Prepare static site artifact
3033
run: |
3134
mkdir -p _site
32-
cp index.html styles.css script.js _site/
35+
cp pitch-deck/index.html pitch-deck/styles.css pitch-deck/script.js _site/
3336
touch _site/.nojekyll
3437
3538
- name: Upload Pages artifact

vercel.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"installCommand": "cd web && npm ci",
3+
"buildCommand": "cd web && npm run build",
4+
"outputDirectory": "web/out"
5+
}

web/next.config.ts

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

3+
const repoName = process.env.GITHUB_REPOSITORY?.split("/")[1] ?? "";
4+
const isGitHubPagesBuild = process.env.GITHUB_ACTIONS === "true" && repoName.length > 0;
5+
36
const nextConfig: NextConfig = {
7+
output: "export",
8+
trailingSlash: true,
9+
basePath: isGitHubPagesBuild ? `/${repoName}` : "",
10+
assetPrefix: isGitHubPagesBuild ? `/${repoName}/` : undefined,
411
images: {
12+
unoptimized: true,
513
remotePatterns: [
614
{
715
protocol: "https",

0 commit comments

Comments
 (0)