Tianhe Gao

pnpm-ci

  1. https://pnpm.io/continuous-integration
  2. [feed/update-feed.yml at main ยท tianheg/feed](https://github.com/tianheg/feed/blob/14c27f488f213851ca94a155fe2e4c4df8ab6573/.github/workflows/update-feed.yml)

`.github/workflows/main.yml`:

```yml name: Build GitHub Pages

on: push: branches:

  • main

workflowdispatch: schedule:

  • cron: '0 22 * * *'

jobs: build: runs-on: ubuntu-latest concurrency: group: ${{ github.workflow }}-${{ github.ref }} steps:

  • uses: actions/checkout@v3
  • name: Cache pnpm modules uses: actions/cache@v3 with: path: ~/.pnpm-store key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-
  • uses: pnpm/action-setup@v2.2.1 with: version: latest runinstall: true
  • name: Setup Node.js environment uses: actions/setup-node@v3.1.1 with: node-version: '16' cache: 'pnpm'
  • name: Build the feed run: pnpm run build
  • name: Copy output run: pnpm run copy
  • name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 if: ${{ github.ref == 'refs/heads/main' }} with: github_{token}: ${{ secrets.GITHUBTOKEN }} publishdir: ./dist forceorphan: true

```


No notes link to this note