PNPM Ci
.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: githubtoken: ${{ secrets.GITHUBTOKEN }} publishdir: ./dist forceorphan: true
```