mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore/CI: use pnpm
This commit is contained in:
57
.github/workflows/main.yml
vendored
57
.github/workflows/main.yml
vendored
@@ -16,23 +16,40 @@ jobs:
|
||||
- 16.x
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- run: npm i
|
||||
- run: npm run build
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GIT_TOKEN }}
|
||||
user_name: ${{ secrets.GIT_USER }}
|
||||
user_email: ${{ secrets.GIT_EMAIL }}
|
||||
publish_branch: gh-pages
|
||||
publish_dir: ./
|
||||
# cname: ruleset.skk.moe
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: |
|
||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
- run: pnpm i
|
||||
- run: pnpm run build
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GIT_TOKEN }}
|
||||
user_name: ${{ secrets.GIT_USER }}
|
||||
user_email: ${{ secrets.GIT_EMAIL }}
|
||||
publish_branch: gh-pages
|
||||
publish_dir: ./
|
||||
# cname: ruleset.skk.moe
|
||||
|
||||
Reference in New Issue
Block a user