File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Deploy Documentation
22
33on :
4- push :
5- tags :
6- - " * "
7- paths :
8- - " docs/** "
9- - " .github/workflows/pages.yml "
10- workflow_dispatch :
4+ workflow_run :
5+ workflows :
6+ - Docs Check
7+ types :
8+ - completed
9+ branches :
10+ - main
1111
1212permissions :
1313 contents : read
2222 build :
2323 runs-on : ubuntu-latest
2424 env :
25+ DOCS_CHANNEL : nightly
26+ DOCS_SHA : ${{ github.sha }}
2527 DOCS_BASE : /
2628 steps :
2729 - name : Checkout
Original file line number Diff line number Diff line change 11import footnote from "markdown-it-footnote" ;
22import { defineConfig } from "vitepress" ;
33
4+ const releaseLabel = process . env . DOCS_VERSION ?? "Latest Release" ;
5+ const releaseLink = process . env . DOCS_CHANNEL === "nightly" ? "https://halloy.chat" : "/" ;
6+ const nightlyLabel = process . env . DOCS_SHA
7+ ? `Nightly (${ process . env . DOCS_SHA . slice ( 0 , 7 ) } )`
8+ : "Nightly" ;
9+ const nightlyLink = process . env . DOCS_CHANNEL === "nightly" ? "/" : "https://nightly.halloy.chat" ;
10+ const docsChannel = process . env . DOCS_CHANNEL === "nightly" ? nightlyLabel : releaseLabel ;
11+
412export default defineConfig ( {
513 title : "Halloy" ,
614 description :
@@ -30,6 +38,13 @@ export default defineConfig({
3038 level : [ 2 , 4 ] ,
3139 } ,
3240 nav : [
41+ {
42+ text : docsChannel ,
43+ items : [
44+ { text : releaseLabel , link : releaseLink } ,
45+ { text : nightlyLabel , link : nightlyLink } ,
46+ ] ,
47+ } ,
3348 {
3449 text : "Themes" ,
3550 link : "https://themes.halloy.chat/" ,
Load diff This file was deleted.
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments