act
设置 act 网络代理
bash
act --env https_proxy=http://192.168.1.4:7897 --env http_proxy=http://192.168.1.4:7897
github actions pnpm 示例
.github/workflows/ci.yaml
需要在 仓库的 Settiongs > Actions > General 中配置允许读写仓库(Read and write permissions)
yaml
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: pnpm
- name: Install Dependencies
run: pnpm i
- name: Build
run: pnpm build
- name: 部署到自定义分支
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_branch: deploy # 指定目标分支
使用 actions-gh-pages 的注意事项
需要在 仓库的 Settiongs > Actions > General 中配置允许读写仓库(Read and write permissions)