feat: 使用pnpm安装依赖时, 和本地保持一致 #132
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: github pages | |
on: | |
push: | |
push: | |
branches: | |
- master | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- "*" # Push events to matching any tags | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [18] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Deploy | |
# 使用说明见: https://github.com/peaceiris/actions-gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
# 部署到YaoZeyuan.github.io上 | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} # 手工生成一对公钥私钥 | |
external_repository: YaoZeyuan/YaoZeyuan.github.io | |
publish_branch: master | |
publish_dir: ./public |