Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,45 @@ jobs:
- name: Publish package to Maven Central
run: mvn clean deploy -Prelease -Dgpg.passphrase="${GPG_PASSPHRASE}" -DskipTests -B
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

version-docs:
runs-on: ubuntu-latest
needs: publish
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: website/package-lock.json

- name: Install website dependencies
run: npm ci
working-directory: website

- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT

- name: Create docs version
run: npx docusaurus docs:version ${{ steps.version.outputs.VERSION }}
working-directory: website

- name: Update default version in config
run: |
sed -i "s/lastVersion: '.*'/lastVersion: '${{ steps.version.outputs.VERSION }}'/" docusaurus.config.ts
working-directory: website

- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "docs: snapshot version ${{ steps.version.outputs.VERSION }}"
git push
11 changes: 11 additions & 0 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ const config: Config = {
path: '../docs',
routeBasePath: '/',
sidebarPath: './sidebars.ts',
lastVersion: '1.9.0',
versions: {
current: {
label: 'Next',
path: 'next',
},
},
editUrl: 'https://github.com/storm-repo/storm-framework/edit/main/docs/',
},
blog: false,
Expand All @@ -47,6 +54,10 @@ const config: Config = {
srcDark: 'img/storm-light.png',
},
items: [
{
type: 'docsVersionDropdown',
position: 'right',
},
{
type: 'docSidebar',
sidebarId: 'docs',
Expand Down