From 79b25c3113d8cd6c586869e01099b4590fd8e2e0 Mon Sep 17 00:00:00 2001 From: v1xingyue Date: Wed, 8 Jan 2025 09:43:07 +0800 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 49 ++++++++++++++---------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9729e6b..9c07d33 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,35 +15,24 @@ permissions: id-token: write jobs: - build-and-deploy: + build: runs-on: ubuntu-latest + steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - - - name: Install Pnpm - run: npm install -g pnpm - - - name: Install - run: pnpm install - - - name: Build - run: pnpm run build - - - name: Add cname - run: echo "eliza101.xyz" > ./packages/page/dist//CNAME - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./packages/page/dist/ - # 保持提交历史 - force_orphan: false - commit_message: 'deploy: ${{ github.event.head_commit.message }}' + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'pnpm' + + - name: Install pnpm + run: npm install -g pnpm + + - name: Install dependencies + run: pnpm install + + - name: Run build + run: pnpm run build