From 2eba2deb0f6e391943a34185beda25e542ae45ae Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Sat, 10 Aug 2024 20:05:19 +0800 Subject: [PATCH] ci: setup pnpm instead of npm Signed-off-by: Ruihang Xia --- .github/workflows/deploy.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b5ed4a6..6b6d015 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,22 +29,34 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up Node + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Install Node.js uses: actions/setup-node@v4 with: node-version: 20 - cache: 'npm' + cache: 'pnpm' + - name: Install dependencies - run: npm ci + run: pnpm install + - name: Build - run: npm run build + run: pnpm run build + - name: Setup Pages uses: actions/configure-pages@v4 + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: # Upload dist folder path: './dist' + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4