Skip to content

Commit 7b7a058

Browse files
committed
Enable static export
1 parent b567e0a commit 7b7a058

3 files changed

Lines changed: 86 additions & 5 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
cache: npm
30+
31+
- name: Install dependencies
32+
run: npm install
33+
34+
- name: Generate symbol assets
35+
run: npm run generate:symbols
36+
37+
- name: Build static export
38+
run: npm run build
39+
env:
40+
GITHUB_ACTIONS: "true"
41+
GITHUB_REPOSITORY: ${{ github.repository }}
42+
43+
- name: Setup Pages
44+
uses: actions/configure-pages@v5
45+
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: ./out
50+
51+
deploy:
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
runs-on: ubuntu-latest
56+
needs: build
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Patch Notation Tool
22

3-
Next.js app for building Eurorack and VCV Rack patch diagrams with Patch & Tweak inspired notation symbols.
3+
Next.js app for building Eurorack and VCV Rack patch diagrams with PATCH & TWEAK patch symbols.
44

55
## What is included
66

77
- `91` individual SVG symbol exports in [`public/symbols`](/Users/walmik/Github/pnt/public/symbols)
8-
- A drag-and-drop patch canvas with movable nodes
9-
- Cable drawing mode with audio, CV, modulation, and neutral cable colors
10-
- JSON import/export for patch persistence
8+
- A drag-and-drop patch canvas with pan, zoom, fit-to-content, and grid snapping
9+
- Cable drawing with sound, modulation, gate/trigger, clock, and pitch cable colors
10+
- IndexedDB-backed local patch library plus JSON import/export
1111
- A sample patch seeded from the visual example you shared
1212

1313
## Commands
@@ -28,3 +28,10 @@ npm run dev
2828
## Reference
2929

3030
Symbol categories and naming were based on the Patch & Tweak symbol reference page and the source sheets from your Desktop images.
31+
32+
## Credits
33+
34+
Symbols used from the free-to-use PATCH & TWEAK patch symbols.
35+
36+
- Symbol overview: https://www.patchandtweak.com/patch-symbols-explained/
37+
- Symbols and licensing/download info: https://www.patchandtweak.com/symbols/

next.config.mjs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
/** @type {import('next').NextConfig} */
2+
const repositoryName = process.env.GITHUB_REPOSITORY?.split("/")[1] ?? "";
3+
const isUserPagesRepo = repositoryName.endsWith(".github.io");
4+
const basePath =
5+
process.env.GITHUB_ACTIONS === "true" && repositoryName && !isUserPagesRepo
6+
? `/${repositoryName}`
7+
: "";
8+
29
const nextConfig = {
3-
reactStrictMode: true
10+
reactStrictMode: true,
11+
output: "export",
12+
trailingSlash: true,
13+
images: {
14+
unoptimized: true
15+
},
16+
basePath,
17+
assetPrefix: basePath || undefined
418
};
519

620
export default nextConfig;

0 commit comments

Comments
 (0)