Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update CI to deploy bugfixes #26

Merged
merged 1 commit into from
Oct 11, 2024
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
8 changes: 8 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- develop
- bugfixes

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -46,6 +47,13 @@ jobs:
env:
DOCS_VERSION: latest

- name: Build bugfixes (patch) docs
run: |
git checkout bugfixes
pnpm run build --outDir .vitepress/dist/patch
env:
DOCS_VERSION: patch

- name: Combine builds
run: |
mv .vitepress/dist-main/* .vitepress/dist/
Expand Down
7 changes: 5 additions & 2 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs';

const __dirname = path.dirname(fileURLToPath(new URL(import.meta.url)));

const isLatest = process.env.DOCS_VERSION === 'latest';
const base = isLatest ? '/latest' : '/';
const DOCS_VERSION = process.env.DOCS_VERSION;
const isLatest = DOCS_VERSION === 'latest';
const isPatch = DOCS_VERSION === 'patch';
const base = isLatest || isPatch ? `/${DOCS_VERSION}` : '/';

// https://vitepress.dev/reference/site-config
export default defineConfig({
Expand Down Expand Up @@ -131,5 +133,6 @@ export default defineConfig({
srcExclude: ['**/README.md', '**/LICENSE.md'],
rewrites: {
'latest/:path*': ':path*',
'patch/:path*': ':path*',
},
});