Skip to content

Commit c27f78f

Browse files
germainlefebvre4Germain LEFEBVRE
andauthored
docs: Show last built version on docs (#81)
Co-authored-by: Germain LEFEBVRE <germain.lefebvre@external.waykonect.com>
1 parent e303c5b commit c27f78f

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

.github/workflows/github-pages.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
name: GitHub Pages
33
on:
44
push:
5-
branches:
6-
- main
5+
tags:
6+
- '*'
77

88
jobs:
99
build:
@@ -34,6 +34,8 @@ jobs:
3434
cd docs/github-pages/
3535
pnpm install
3636
pnpm build
37+
env:
38+
CVWONDER_VERSION: ${{ github.ref_name }}
3739

3840
- name: Upload static files as artifact
3941
id: deployment

.github/workflows/pull-requests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
paths:
99
- 'internal/**'
1010
- 'cmd/**'
11-
- '.github/**'
1211
- 'go.mod'
1312
- 'go.sum'
1413

.github/workflows/themes-generation.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
paths:
99
- 'internal/**'
1010
- 'cmd/**'
11-
- '.github/**'
1211
- 'go.mod'
1312
- 'go.sum'
1413

docs/github-pages/docusaurus.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import {themes as prismThemes} from 'prism-react-renderer';
22
import type {Config} from '@docusaurus/types';
33
import type * as Preset from '@docusaurus/preset-classic';
44

5+
const version = process.env.CVWONDER_VERSION || 'dev';
6+
57
const config: Config = {
68
title: 'CV Wonder',
79
tagline: 'Generate your CV with Wonder!',
@@ -78,6 +80,16 @@ const config: Config = {
7880
label: 'Export',
7981
position: 'left',
8082
},
83+
{
84+
to: '/docs/validation',
85+
label: 'Validation',
86+
position: 'left',
87+
},
88+
{
89+
href: `https://github.com/germainlefebvre4/cvwonder/releases/tag/${version}`,
90+
label: version,
91+
position: 'right',
92+
},
8193
{
8294
href: 'https://github.com/germainlefebvre4/cvwonder',
8395
label: 'GitHub',

0 commit comments

Comments
 (0)