Skip to content

ci: try to fix push error #57

ci: try to fix push error

ci: try to fix push error #57

Workflow file for this run

name: ci
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 签出仓库
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: 设置 PNPM
uses: pnpm/action-setup@v3
with:
version: 9
- name: 设置 Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
cache: pnpm
- name: 安装依赖项
run: pnpm install
- name: 构建
run: |
pnpm build
# - name: Deploy
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# branch: gh-pages
# folder: dist
- name: 提交变更项
uses: EndBug/add-and-commit@v9
with:
# default_author: github_actions
add: "src"
message: "Auto Build Preview"
author_name: GitHub Actions
author_email: github-actions[bot]@users.noreply.github.com
# send-dispatch:
# name: 请求部署上线
# if: github.repository == 'zotero-chinese/styles' && github.event_name != 'pull_request'
# needs:
# - build
# runs-on: ubuntu-latest
# steps:
# - name: Repository Dispatch
# uses: peter-evans/repository-dispatch@v3
# with:
# token: ${{ secrets.ACCESS_TOKEN }}
# repository: zotero-chinese/website
# event-type: update-content