Skip to content

Commit f23d030

Browse files
authored
Merge pull request #13 from alienmind/pipeline/hosted-strudel
Pipeline/hosted strudel
2 parents b276eb1 + ec1b9aa commit f23d030

21 files changed

Lines changed: 99 additions & 1154 deletions

.github/workflows/deploy.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["main", "pipeline/hosted-strudel"]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
# Build job
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
submodules: recursive
28+
29+
- name: Generate Presentation (Pandoc)
30+
run: |
31+
mkdir _site
32+
docker run --rm -v ${{ github.workspace }}:/data pandoc/core \
33+
WORKSHOP.md -t revealjs -s -o _site/index.html \
34+
-V theme=black -V revealjs-url=https://unpkg.com/reveal.js \
35+
--slide-level=2 --css=doc/custom.css
36+
37+
- name: Copy Assets
38+
run: |
39+
mkdir -p _site/doc
40+
cp doc/* _site/doc/
41+
42+
- name: Setup Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: '20'
46+
47+
- name: Install pnpm
48+
uses: pnpm/action-setup@v2
49+
with:
50+
version: 8
51+
52+
- name: Install Strudel Dependencies
53+
working-directory: strudel
54+
run: pnpm install
55+
56+
- name: Build Strudel
57+
working-directory: strudel
58+
env:
59+
STRUDEL_SITE: "https://alienmind.github.io"
60+
STRUDEL_BASE: "/algorave/strudel/"
61+
# We run prebuild (Generate docs etc), then build website
62+
run: |
63+
pnpm run prebuild
64+
cd website
65+
pnpm run build
66+
67+
- name: Prepare Deployment Artifact
68+
run: |
69+
# Create directory for strudel and copy build result
70+
mkdir -p _site/strudel
71+
cp -r strudel/website/dist/* _site/strudel/
72+
73+
- name: Upload artifact
74+
uses: actions/upload-pages-artifact@v3
75+
with:
76+
path: '_site'
77+
78+
# Deployment job
79+
deploy:
80+
environment:
81+
name: github-pages
82+
url: ${{ steps.deployment.outputs.page_url }}
83+
runs-on: ubuntu-latest
84+
needs: build
85+
steps:
86+
- name: Deploy to GitHub Pages
87+
id: deployment
88+
uses: actions/deploy-pages@v4

.github/workflows/deploy_slides.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
node_modules
22
.DS_Store
33

4+
# Generated Documentation & Examples
45
# Generated Documentation & Examples
56
web/public/examples/*.strudel
6-
# web/public/presentation.html
7+
dist/
78

89
# Next.js
910
web/.next/
1011
web/out/
1112
web/build/
1213
.next/
14+
.env

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The project is a composite of:
1818
This "hub" aims to integrate a conglomerate of useful tools for Algorave:
1919

2020
* [**strudel.cc**](https://strudel.cc) - The official Strudel website and player.
21+
* [**Self-hosted Strudel**](https://alienmind.github.io/algorave/strudel/) - The local fork hosted on GitHub Pages.
2122
* [**strudel-mcp-server**](https://github.com/williamzujkowski/strudel-mcp-server) - MCP Server for Strudel (local integration) (see also [npm page](https://libraries.io/npm/@williamzujkowski%2Fstrudel-mcp-server))
2223
* [**midi-to-strudel**](https://github.com/alienmind/MIDI-To-Strudel) - Scripts to convert MIDI files to Strudel code.
2324
* **Other useful stuff** - More integrations coming soon!

WORKSHOP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A **1-hour workshop** exploring how to create music with code using Strudel.
66

77
## 🔗 Links
88

9-
**Strudel**: [https://strudel.cc](https://strudel.cc)
9+
**Strudel**: [https://strudel.cc](https://strudel.cc) || [Self-hosted option](https://alienmind.github.io/algorave/strudel/)
1010
(install the PWA for best performance)
1111

1212
**Site Gallery / Tutorial**: [https://strudel.patternclub.org/workshop/site-gallery](https://strudel.patternclub.org/workshop/site-gallery)
@@ -152,7 +152,7 @@ Add the server to your configuration (~/.gemini/settings.json)
152152
Open up side by side:
153153

154154
* [MCP Strudel Website](https://mcp-strudel.mcp.mathplosion.com/strudel/)
155-
* Optionally: [Strudel.cc](https://strudel.cc/) - not accessible with ECB laptops
155+
* Optionally: Use my [Strudel.cc fork](https://alienmind.github.io/algorave/strudel/) (or [Official Strudel.cc](https://strudel.cc/) - not accessible with corporate laptops)
156156
* Any terminal with Gemini CLI
157157
* Pick the session_id from MCP, paste it to LLM as first prompt: "Use session_id: xxxx for Strudel operations" so it can interact with MCP server window
158158

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ services:
6767
image: pandoc/core
6868
volumes:
6969
- .:/data
70-
command: [ "WORKSHOP.md", "-t", "revealjs", "-s", "-o", "web/public/presentation.html", "-V", "theme=black", "-V", "revealjs-url=https://unpkg.com/reveal.js", "--slide-level=2", "--css=doc/custom.css" ]
70+
command: [ "WORKSHOP.md", "-t", "revealjs", "-s", "-o", "dist/presentation.html", "-V", "theme=black", "-V", "revealjs-url=https://unpkg.com/reveal.js", "--slide-level=2", "--css=doc/custom.css" ]
7171

7272
networks:
7373
algorave_network:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"docker:build-base": "docker build -t algorave/mcp-base:latest -f strudel-mcp-server/Dockerfile strudel-mcp-server",
1010
"docker:up": "npm run docker:build-base && docker-compose up --build",
1111
"docker:down": "docker-compose down",
12-
"docs": "docker-compose run --rm docs && npm run sync-docs",
12+
"prebuild": "mkdir -p dist",
13+
"docs": "npm run prebuild && docker-compose run --rm docs && npm run sync-docs",
1314
"generate-diagram": "node scripts/generate-diagram.js",
1415
"sync-docs": "node scripts/sync-docs.js",
1516
"sync-examples": "node scripts/sync-examples.js",

scripts/sync-docs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const fs = require('fs');
22
const path = require('path');
33

44
const srcDocDir = path.join(__dirname, '..', 'doc');
5-
const destPublicDir = path.join(__dirname, '..', 'web', 'public');
5+
const destPublicDir = path.join(__dirname, '..', 'dist');
66
const destDocDir = path.join(destPublicDir, 'doc');
77

88
function copyFile(src, dest) {

web/public/doc/algorave.png

-1 MB
Binary file not shown.

0 commit comments

Comments
 (0)