将预览调整为details #59
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 | |
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 |