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 e340891
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 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
26 changes: 14 additions & 12 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 All @@ -21,22 +23,22 @@ export default defineConfig({
{ text: 'Home', link: '/' },
{ text: 'Documentation', link: '/requirement-and-installation' },
{ text: 'Download', link: 'https://rotki.com/download' },
{
...(isPatch ? [] : [{

Check failure on line 26 in .vitepress/config.mts

View workflow job for this annotation

GitHub Actions / ci

Expected newline between test and consequent of ternary expression

Check failure on line 26 in .vitepress/config.mts

View workflow job for this annotation

GitHub Actions / ci

Expected newline between consequent and alternate of ternary expression
text: isLatest ? 'Latest' : 'Stable',
items: [
isLatest
? {
text: 'Stable',
link: 'https://docs.rotki.com/',
target: '_blank',
}
text: 'Stable',

Check failure on line 31 in .vitepress/config.mts

View workflow job for this annotation

GitHub Actions / ci

Expected indentation of 16 spaces but found 14
link: 'https://docs.rotki.com/',

Check failure on line 32 in .vitepress/config.mts

View workflow job for this annotation

GitHub Actions / ci

Expected indentation of 16 spaces but found 14
target: '_blank',

Check failure on line 33 in .vitepress/config.mts

View workflow job for this annotation

GitHub Actions / ci

Expected indentation of 16 spaces but found 14
}

Check failure on line 34 in .vitepress/config.mts

View workflow job for this annotation

GitHub Actions / ci

Expected indentation of 14 spaces but found 12
: {
text: 'Latest',
link: 'https://docs.rotki.com/latest/',
target: '_blank',
},
text: 'Latest',

Check failure on line 36 in .vitepress/config.mts

View workflow job for this annotation

GitHub Actions / ci

Expected indentation of 16 spaces but found 14
link: 'https://docs.rotki.com/latest/',

Check failure on line 37 in .vitepress/config.mts

View workflow job for this annotation

GitHub Actions / ci

Expected indentation of 16 spaces but found 14
target: '_blank',

Check failure on line 38 in .vitepress/config.mts

View workflow job for this annotation

GitHub Actions / ci

Expected indentation of 16 spaces but found 14
},

Check failure on line 39 in .vitepress/config.mts

View workflow job for this annotation

GitHub Actions / ci

Expected indentation of 14 spaces but found 12
],
},
}]),
],

sidebar: [
Expand Down

0 comments on commit e340891

Please sign in to comment.