fix: build docs #76
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
# 工作流的名称。 GitHub 在存储库的“操作”选项卡下显示工作流的名称。如果省略 `name`,GitHub 会显示相对于存储库根目录的工作流文件路径。 | |
name: publish npm | |
# This example workflow assumes that the default branch for your repository is `main`. If the default branch has a different name, edit this example and add your repository's default branch. | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
cache: pnpm | |
- name: Setup npmrc | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > .npmrc | |
- run: pnpm install --no-frozen-lockfile | |
- run: | | |
pnpm build -a | |
- run: pnpm publish --access public -r --no-git-checks | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |