Skip to content

Commit

Permalink
chore: update CI to deploy bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukicenturi committed Oct 11, 2024
1 parent d0719c1 commit 7d231ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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
6 changes: 4 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

0 comments on commit 7d231ce

Please sign in to comment.