@@ -2,7 +2,7 @@ name: Deploy Stories to GitHub Pages
22
33on :
44 push :
5- branches : [main]
5+ branches : [main, feat/next ]
66 workflow_dispatch :
77
88permissions :
@@ -38,51 +38,55 @@ jobs:
3838 - name : Build module
3939 run : pnpm build
4040
41- # ── Frame app (playground/) ─────────────────────────────────────────────
42- # Generates the component renderer routes at /-frame/**
41+ # ── Playground dependencies ─────────────────────────────────────────────
4342
44- - name : Install frame app dependencies
43+ - name : Install playground dependencies
4544 working-directory : playground
4645 run : pnpm install
4746
48- - name : Generate frame app
47+ # ── Frame pass ──────────────────────────────────────────────────────────
48+ # Generates the component renderer routes at /-frame/**
49+ # NUXT_STORIES_MODE overrides the mode option so the same nuxt.config is reused.
50+
51+ - name : Generate frame output
4952 working-directory : playground
5053 run : pnpm nuxi generate
5154 env :
55+ NUXT_STORIES : " 1"
5256 NUXT_STORIES_MODE : frame
53- # Set to your GitHub Pages base path, e.g. /nuxt-stories/ for
54- # https://rezozero.github.io/nuxt-stories/
57+ # Base path matching the GitHub Pages URL: https://rezozero.github.io/nuxt-stories/
5558 NUXT_APP_BASE_URL : /nuxt-stories/
5659
57- # ── Shell app (playground/stories/) ────────────────────────────────────
58- # Generates the stories UI (nav, iframe wrapper)
60+ - name : Save frame output
61+ run : mv playground/.output/public playground/.output/frame-public
5962
60- - name : Install shell app dependencies
61- working-directory : playground/stories
62- run : pnpm install
63+ # ── Shell pass ──────────────────────────────────────────────────────────
64+ # Generates the stories UI (nav + iframe wrapper)
6365
64- - name : Generate shell app
65- working-directory : playground/stories
66+ - name : Generate shell output
67+ working-directory : playground
6668 run : pnpm nuxi generate
6769 env :
70+ NUXT_STORIES : " 1"
71+ NUXT_STORIES_MODE : shell
6872 NUXT_APP_BASE_URL : /nuxt-stories/
6973
7074 # ── Merge outputs ───────────────────────────────────────────────────────
71- # Copy the frame app 's /-frame/** output into the shell's output so both
72- # are served from the same origin (required for same-origin postMessage).
75+ # Copy the frame output 's /-frame/** into the shell output so both are
76+ # served from the same origin (required for same-origin postMessage).
7377
7478 - name : Merge frame output into shell output
7579 run : |
76- cp -r playground/.output/public/-frame playground/stories /.output/public/-frame
80+ cp -r playground/.output/frame- public/-frame playground/.output/public/-frame
7781
7882 # GitHub Pages ignores folders prefixed with _ by default; .nojekyll disables this.
7983 - name : Add .nojekyll
80- run : touch playground/stories/ .output/public/.nojekyll
84+ run : touch playground/.output/public/.nojekyll
8185
8286 - name : Upload Pages artifact
8387 uses : actions/upload-pages-artifact@v3
8488 with :
85- path : playground/stories/ .output/public
89+ path : playground/.output/public
8690
8791 deploy :
8892 needs : build
0 commit comments