- name: Cache pnpm-store id: cache-pnpm-store uses: actions/cache@v1 with: path: ~/.pnpm-store key: ${{ runner.os }}-pnpm-store - name: Cache node_modules id: cache-node-modules uses: actions/cache@v1 with: path: node_modules key: ${{ hashFiles('**/package.json') }}-pnpm...
前面向大家介绍了 Ant Design 使用 GitHub Action 的诸多场景,我们不妨实际动手尝试一下,运用到自己项目中,提高生产效率。下面通过一个简单的 Demo 进行演示。 创建项目 通过命令行pnpm create vite@latest my-react-app --template react-ts创建一个 Vite + React 项目。 配置CI Workflow 在项目根目录里.github/...
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onjobs:deploy:name:Deploy to GitHub Pages runs-on:ubuntu-lateststeps:-uses:actions/checkout@v3-uses:pnpm/action-setup@v2with:version:8-uses:actions/setup-node@v3with:node-version:18cache:'pnpm'-name:Insta...
ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 name: Install pnpm with: version: 10 run_install: false - name: Install Node.js uses: actions/setup-node@v4 with: node-version: 20 cache: 'pnpm' - name: Install dependencies run: pnpm insta...
uncomment the following line# submodules: true-name:Installpnpmuses:pnpm/action-setup@v2with:version:7run_install:true-name:SetupNode.jsuses:actions/setup-node@v3with:node-version:16cache:pnpm-name:InstallDepsrun:pnpminstall--frozen-lockfile-name:BuildDocsenv:NODE_OPTIONS:--max_old_space_size=81...
To cache dependencies for a job, you can use GitHub'scacheaction. The action creates and restores a cache identified by a unique key. Alternatively, if you are caching the package managers listed below, using their respective setup-* actions requires minimal configuration and will create and res...
name:github pageson:push:branches:-mainpermissions:contents:writejobs:deploy:runs-on:ubuntu-lateststeps:-uses:actions/checkout@v3-uses:pnpm/action-setup@v2with:version:8.6.2-uses:actions/setup-node@v3with:node-version:16cache:'pnpm'-run:pnpm install--frozen-lockfile-run:pnpm build-name:Deployus...
Package managerssetup-* action for caching npm, Yarn, pnpm setup-node pip, pipenv, Poetry setup-python Gradle, Maven setup-java RubyGems setup-ruby Go go.sum setup-go .NET NuGet setup-dotnet Warning Be mindful of the following when using caching with GitHub Actions: We recommend that you ...
[16.x] steps: - uses: actions/checkout@v2 - uses: pnpm/action-setup@v2.2.1 with: version: 6.32.2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' - run: pnpm i - run: npm run ...
└── pnpm-workspace.yaml Turborepo 本文主要在changesets,所以此处简单介绍下~ Turborepo介绍 Turborepo是专为JavaScript和Typescript的monorepo项目设计的高性能构建系统。可以高效管理和构建项目中多个packages,通过缓存构建和测试结果,来提升开发和持续集成的效率。