Skip to content

feat: deploy versioned docs to GitHub Pages#1236

Merged
astagi merged 4 commits into
italia:mainfrom
vijaygovindaraja:feat/1233-versioned-docs
Apr 13, 2026
Merged

feat: deploy versioned docs to GitHub Pages#1236
astagi merged 4 commits into
italia:mainfrom
vijaygovindaraja:feat/1233-versioned-docs

Conversation

@vijaygovindaraja
Copy link
Copy Markdown
Contributor

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 Vite base: './' so asset paths are relative and work from any subdirectory
  • publish-release.yml — on tag push, deploy to /<version>/ and /latest/ using peaceiris/actions-gh-pages with keep_files: true; add root index.html redirect to /latest/
  • update-docs.yml — same approach for manual doc updates, deploys to /latest/

How it works

  • peaceiris/actions-gh-pages with destination_dir and keep_files: true deploys into subdirectories without deleting existing ones
  • Root index.html does a meta-refresh redirect to latest/, so existing links keep working
  • Relative Vite base ('./') means the same Storybook build works regardless of which subdirectory it's served from

Inspired by the approach in dati-semantic-schema-editor referenced in the issue discussion.

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
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 1, 2026

@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.

@vijaygovindaraja
Copy link
Copy Markdown
Contributor Author

@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.

@vijaygovindaraja
Copy link
Copy Markdown
Contributor Author

Closing for now since this hasn't gotten review attention. Happy to revisit if there's interest.

@astagi
Copy link
Copy Markdown
Member

astagi commented Apr 10, 2026

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 😄

@astagi astagi reopened this Apr 10, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-react-kit Ready Ready Preview Apr 13, 2026 0:44am

Request Review

@vijaygovindaraja
Copy link
Copy Markdown
Contributor Author

@astagi got it thanks

@stefanone91
Copy link
Copy Markdown
Contributor

Hey guys! i'll take a look to your PR now 👍

@stefanone91
Copy link
Copy Markdown
Contributor

@vijaygovindaraja i've checked your PR and suggested some changes.
I've created a new PR to improve security and remove duplicated workflow steps.
Take a look at: vijaygovindaraja#1
Thank you!

@vijaygovindaraja
Copy link
Copy Markdown
Contributor Author

@stefanone91 looks good. Pinned SHAs and consolidated deploy logic make sense. Merged.

@stefanone91
Copy link
Copy Markdown
Contributor

let @astagi take the final review and approve. I don't have any permission.

@astagi astagi merged commit 9d3fbfd into italia:main Apr 13, 2026
4 of 5 checks passed
@astagi
Copy link
Copy Markdown
Member

astagi commented Apr 13, 2026

@vijaygovindaraja @stefanone91 versioned documentation has been deployed and now is live 🚀

thank you for your awesome work and support!

@stefanone91
Copy link
Copy Markdown
Contributor

nice job! thank you everyone

@vijaygovindaraja
Copy link
Copy Markdown
Contributor Author

Thank you @astagi @stefanone91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ospitare vecchie versioni sulla documentazione GitHub Pages

3 participants