feat: deploy versioned docs to GitHub Pages#1236
Conversation
Each release now deploys documentation into its own subdirectory (e.g. /v5.10.0/) while also updating /latest/. Old versions remain accessible. A root index.html redirects to /latest/. - Switch from gh-pages npm package to peaceiris/actions-gh-pages with keep_files so previous versions are preserved - Set Storybook Vite base to './' for relative asset paths - Update both publish-release and update-docs workflows Fixes italia#1233
|
@vijaygovindaraja is attempting to deploy a commit to the dip-trasformazione-digitale Team on Vercel. A member of the Team first needs to authorize it. |
|
@astagi this picks up where the discussion on #1233 left off — each release now gets its own subdirectory on GitHub Pages so older docs stay accessible. used the same peaceiris/actions-gh-pages approach from the dati-semantic-schema-editor workflow that @stefanone91 linked. happy to adjust anything. |
|
Closing for now since this hasn't gotten review attention. Happy to revisit if there's interest. |
|
Hey @vijaygovindaraja don't worry! Thank you for your PR I'll let @stefanone91 reviewing it. There's no lack of attention on your review, our team is really small and we don't have enough time to work on everything 😄 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@astagi got it thanks |
|
Hey guys! i'll take a look to your PR now 👍 |
|
@vijaygovindaraja i've checked your PR and suggested some changes. |
|
@stefanone91 looks good. Pinned SHAs and consolidated deploy logic make sense. Merged. |
|
let @astagi take the final review and approve. I don't have any permission. |
|
@vijaygovindaraja @stefanone91 versioned documentation has been deployed and now is live 🚀 thank you for your awesome work and support! |
|
nice job! thank you everyone |
|
Thank you @astagi @stefanone91 |
Fixes #1233
Summary
Each release now deploys Storybook docs into a versioned subdirectory (e.g.
/v5.10.0/) while keeping/latest/updated. Previous versions stay accessible so users on older library versions can still browse matching docs.Changes
.storybook/main.ts— set Vitebase: './'so asset paths are relative and work from any subdirectorypublish-release.yml— on tag push, deploy to/<version>/and/latest/usingpeaceiris/actions-gh-pageswithkeep_files: true; add rootindex.htmlredirect to/latest/update-docs.yml— same approach for manual doc updates, deploys to/latest/How it works
peaceiris/actions-gh-pageswithdestination_dirandkeep_files: truedeploys into subdirectories without deleting existing onesindex.htmldoes a meta-refresh redirect tolatest/, so existing links keep working'./') means the same Storybook build works regardless of which subdirectory it's served fromInspired by the approach in dati-semantic-schema-editor referenced in the issue discussion.