diff --git a/.github/workflows/demo.deploy.yml b/.github/workflows/demo.deploy.yml index 6cd1d62..238c2e0 100644 --- a/.github/workflows/demo.deploy.yml +++ b/.github/workflows/demo.deploy.yml @@ -17,17 +17,34 @@ jobs: steps: - uses: actions/checkout@v4 + + # Set up Node.js with caching for pnpm - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'pnpm' - + cache: 'pnpm' # Caching with pnpm + # Install pnpm globally - - run: npm install -g pnpm - + - name: Install pnpm + run: | + npm install -g pnpm + # Ensure pnpm is in the PATH + echo "/usr/local/bin" >> $GITHUB_PATH + + # Cache pnpm store + - name: Cache pnpm store + uses: actions/cache@v2 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + # Install dependencies using pnpm - - run: pnpm install - - # Build the project - - run: pnpm run build + - name: Install dependencies + run: pnpm install + + # Build the project using pnpm + - name: Build the project + run: pnpm run build --if-present