Skip to content

Commit 7fdb3be

Browse files
committed
fix: remove pip cache from sync-contentful workflow to resolve dependency file detection error
1 parent 8329a4c commit 7fdb3be

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# 从 Contentful CMS 自动生成 App 应用的元数据文档(_include/)和 App 文档骨架。
2+
# 触发方式:管理员手动触发(workflow_dispatch),需要仓库 Write 权限 + CONTENTFUL_ACCESS_TOKEN。
3+
# 注意:该 workflow 生成的 _include/ 文件不应手工修改,属于自动管理内容。
4+
5+
name: Sync from Contentful
6+
7+
on:
8+
workflow_dispatch:
9+
10+
jobs:
11+
generate:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.x'
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install Jinja2 requests contentful
28+
29+
- name: Generate Markdown files
30+
env:
31+
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_GRAPHQLTOKEN }}
32+
run: |
33+
python builds/sync_contentful.py template/meta/zh_head.jinja2 versioned_docs/version-2.0/apps/_include
34+
python builds/sync_contentful.py template/meta/en_head.jinja2 i18n/en/docusaurus-plugin-content-docs/version-2.0/apps/_include
35+
python builds/sync_contentful.py template/meta/zh_app.jinja2 versioned_docs/version-2.0/apps --ignore-list template/meta/skip_file.json
36+
python builds/sync_contentful.py template/meta/en_app.jinja2 i18n/en/docusaurus-plugin-content-docs/version-2.0/apps --ignore-list template/meta/skip_file.json
37+
38+
- name: Commit and push changes
39+
uses: stefanzweifel/git-auto-commit-action@v5
40+
with:
41+
commit_message: Automated generation product markdown header

0 commit comments

Comments
 (0)