Skip to content

Commit 7095cae

Browse files
committed
update ci
1 parent 6d85423 commit 7095cae

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.github/workflows/Deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ jobs:
1717
node-version: 22.x
1818
- name: Get yarn cache
1919
id: yarn-cache
20-
run: echo "::set-output name=dir::$(yarn cache dir)"
20+
run: echo "::set-output name=dir::$(yarn config get globalFolder)"
2121
- name: Restore Cache
2222
uses: actions/cache@v4
2323
with:
2424
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-
2727
- name: Install
28-
run: yarn install --ignore-engines
28+
run: yarn
2929
- name: Build
30-
run: yarn build && echo "hydro.js.org" >./.vuepress/dist/CNAME
30+
run: yarn build && echo "hydro.js.org" >./out/CNAME
3131
- name: Deploy
3232
uses: peaceiris/actions-gh-pages@v3
3333
with:
3434
github_token: ${{ secrets.GITHUB_TOKEN }}
35-
publish_dir: ./.vuepress/dist
35+
publish_dir: ./out
3636
publish_branch: master
3737
force_orphan: true

app/docs/[[...slug]]/layout.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ const maps = {
1010
'Tools': <GithubInfo owner="hydro-dev" repo="xcpc-tools" />,
1111
};
1212

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;
1415
return (
1516
<DocsLayout
1617
tree={source.pageTree}
1718
{...baseOptions}
18-
links={Object.keys(maps).find((key) => params.slug?.[0] === key) ? [
19+
links={Object.keys(maps).find((key) => slug?.[0] === key) ? [
1920
{
2021
type: 'custom',
21-
children: maps[params.slug?.[0] as keyof typeof maps],
22+
children: maps[slug?.[0] as keyof typeof maps],
2223
},
2324
] : []}
2425
sidebar={{

0 commit comments

Comments
 (0)