Skip to content

Commit 2825147

Browse files
committed
chore: 触发更新
1 parent b029e96 commit 2825147

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

.github/workflows/docs.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- test-workflow
78
jobs:
89
deploy:
910
runs-on: ubuntu-latest
@@ -14,17 +15,25 @@ jobs:
1415
PATTERNS: |
1516
+(docs|docs-vuepress|example)/**/*
1617
+(docs|docs-vuepress|example)/.*/**/*
17-
- uses: actions/setup-node@v1
18+
- uses: actions/setup-node@v3
1819
with:
19-
node-version: '18'
20+
node-version: '22'
2021
- uses: pnpm/action-setup@v2
2122
if: env.GIT_DIFF
2223
with:
23-
version: 9
24+
version: 10
2425
run_install: |
2526
- recursive: true
2627
args: [--frozen-lockfile, --strict-peer-dependencies]
2728
29+
- name: Upgrade npm to 10
30+
run: npm install -g npm@10
31+
# 👉 新增的 step:cd example && npm ci
32+
- name: Install example deps (debug, keep logs)
33+
run: |
34+
cd example
35+
npm ci --legacy-peer-deps
36+
2837
# vuepress生成最终文档
2938
- name: generate docs file
3039
if: env.GIT_DIFF

example/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node-linker=hoisted
2+
registry=https://registry.npmjs.org/

example/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ configProvider({
1818
})
1919

2020
// app.js
21-
// 触发 main 分支 docs 更新 4
21+
// 触发 main 分支 docs 更新 20
2222
createApp({})
2323

2424
if (isIframe) {

example/components/theme-container/index.mpx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,8 @@
77
<script>
88
import { createComponent } from '@mpxjs/core'
99
import { useTheme } from '../../common/theme'
10-
import { REACTHOOKSEXEC } from '@mpxjs/core'
11-
import { useContext } from 'react'
12-
import { VarContext } from '@mpxjs/webpack-plugin/lib/runtime/components/react/dist/context'
1310

1411
createComponent({
15-
data: {
16-
varContext: {}
17-
},
18-
[REACTHOOKSEXEC]() {
19-
const varContext = useContext(VarContext)
20-
if (this.varContext !== varContext) {
21-
this.varContext = varContext
22-
}
23-
},
2412
setup() {
2513
const { themeType } = useTheme()
2614
return {

example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)