From 45081e2fd79f50f624c84ae032e16aee59ab1aee Mon Sep 17 00:00:00 2001 From: Mist Date: Sat, 24 Feb 2024 20:12:21 +0800 Subject: [PATCH] [Feat] fix pack CI (#23) * [Feat] fix pack CI * [Fix] specify cache dependency path --- .github/workflows/pack.yaml | 10 ++++++++-- snap-client/src/app.tsx | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pack.yaml b/.github/workflows/pack.yaml index 1356c75..432146c 100644 --- a/.github/workflows/pack.yaml +++ b/.github/workflows/pack.yaml @@ -9,12 +9,15 @@ jobs: pack: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup nodejs uses: actions/setup-node@v4 - working-directory: snap-client with: node-version: 20 cache: npm + cache-dependency-path: ./snap-client/package-lock.json - name: Install deps working-directory: snap-client @@ -27,4 +30,7 @@ jobs: - name: Move into public folder run: cp -r snap-client/build snap-server/public - + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + message: "[Update] build newest client package" diff --git a/snap-client/src/app.tsx b/snap-client/src/app.tsx index 2c49f3d..8775737 100644 --- a/snap-client/src/app.tsx +++ b/snap-client/src/app.tsx @@ -67,7 +67,7 @@ function App() { useEffect(() => { document.title = config?.preview_title ?? PREVIEW_TITLE_PLACEHOLDER; - }, []); + }, [config?.preview_title]); return (