File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -17,21 +17,21 @@ jobs:
17
17
node-version : 22.x
18
18
- name : Get yarn cache
19
19
id : yarn-cache
20
- run : echo "::set-output name=dir::$(yarn cache dir )"
20
+ run : echo "::set-output name=dir::$(yarn config get globalFolder )"
21
21
- name : Restore Cache
22
22
uses : actions/cache@v4
23
23
with :
24
24
path : ${{ steps.yarn-cache.outputs.dir }}
25
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
26
- restore-keys : ${{ runner.os }}-yarn-
25
+ key : ${{ runner.os }}-next- yarn-${{ hashFiles('**/yarn.lock') }}
26
+ restore-keys : ${{ runner.os }}-next- yarn-
27
27
- name : Install
28
- run : yarn install --ignore-engines
28
+ run : yarn
29
29
- name : Build
30
- run : yarn build && echo "hydro.js.org" >./.vuepress/dist /CNAME
30
+ run : yarn build && echo "hydro.js.org" >./out /CNAME
31
31
- name : Deploy
32
32
uses : peaceiris/actions-gh-pages@v3
33
33
with :
34
34
github_token : ${{ secrets.GITHUB_TOKEN }}
35
- publish_dir : ./.vuepress/dist
35
+ publish_dir : ./out
36
36
publish_branch : master
37
37
force_orphan : true
Original file line number Diff line number Diff line change @@ -10,15 +10,16 @@ const maps = {
10
10
'Tools' : < GithubInfo owner = "hydro-dev" repo = "xcpc-tools" /> ,
11
11
} ;
12
12
13
- export default function Layout ( { children, params } : { children : ReactNode , params : { slug : string [ ] } } ) {
13
+ export default async function Layout ( { children, params } : { children : ReactNode , params : Promise < { slug : string [ ] } > } ) {
14
+ const { slug } = await params ;
14
15
return (
15
16
< DocsLayout
16
17
tree = { source . pageTree }
17
18
{ ...baseOptions }
18
- links = { Object . keys ( maps ) . find ( ( key ) => params . slug ?. [ 0 ] === key ) ? [
19
+ links = { Object . keys ( maps ) . find ( ( key ) => slug ?. [ 0 ] === key ) ? [
19
20
{
20
21
type : 'custom' ,
21
- children : maps [ params . slug ?. [ 0 ] as keyof typeof maps ] ,
22
+ children : maps [ slug ?. [ 0 ] as keyof typeof maps ] ,
22
23
} ,
23
24
] : [ ] }
24
25
sidebar = { {
You can’t perform that action at this time.
0 commit comments