feat:增加 url 参数并更新文档 #12
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
STORE_PATH=$(pnpm store path --silent) | |
echo "STORE_PATH=$STORE_PATH" >> $GITHUB_ENV | |
echo "pnpm store path: $STORE_PATH" | |
- name: Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: Check format | |
run: pnpm format:check | |
- name: Run lint | |
run: pnpm lint | |
- name: Build | |
run: pnpm build | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/ |