Update Plugin Info #603
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: Update Plugin Info | |
on: | |
schedule: | |
- cron: '0 */2 * * *' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Setup pnpm | |
run: | | |
corepack enable | |
corepack prepare pnpm@latest --activate | |
- name: Get pnpm store path | |
id: pnpm-cache-path | |
run: echo "storePath=$(pnpm store path)" >> $GITHUB_ENV | |
- name: Run pnpm start | |
run: | | |
cd .workflow-script | |
pnpm install | |
pnpm run start | |
- name: Cache pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.storePath }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Deploy to gh-pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: .workflow-script/output # 上传的目录 |