Skip to content

Commit 6eaa8b3

Browse files
committed
update
1 parent a905c52 commit 6eaa8b3

File tree

2 files changed

+131
-5
lines changed

2 files changed

+131
-5
lines changed

.github/workflows/docs.yml

+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: docs
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '30 15 * * *'
7+
push:
8+
branches:
9+
- master
10+
paths:
11+
- 'docs/**'
12+
- '**.rst'
13+
- '**/docs.yml'
14+
15+
env:
16+
DOCS_FOR: STM32G030
17+
18+
jobs:
19+
build:
20+
if: github.repository_owner == 'SoCXin'
21+
name: Build
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Check out
25+
uses: actions/checkout@v3
26+
with:
27+
submodules: "recursive"
28+
token: ${{ secrets.SOC_XIN_TOCKEN }}
29+
fetch-depth: 1
30+
31+
- name: Checkout Docs
32+
uses: actions/checkout@v3
33+
with:
34+
repository: SoCXin/docs
35+
token: ${{ secrets.SOC_XIN_TOCKEN }}
36+
ref: ${{ env.DOCS_FOR }}
37+
fetch-depth: 1
38+
path: www
39+
40+
- name: Setup Python
41+
uses: actions/setup-python@v4
42+
with:
43+
python-version: 3.9
44+
45+
- name: Install dependencies
46+
working-directory: www
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install tox
50+
51+
- name: Build docs
52+
working-directory: www
53+
run: |
54+
tox -e docs
55+
56+
- name: Preserve Docs
57+
run: |
58+
tar -czvf docs.tar.gz -C www/_build html rtdpage
59+
60+
- name: Save artifact
61+
uses: actions/upload-artifact@v3
62+
with:
63+
name: docs
64+
path: docs.tar.gz
65+
66+
deploy:
67+
name: Deploy
68+
needs: build
69+
runs-on: ubuntu-latest
70+
env:
71+
DOCS_REPO: SoCXin/web
72+
DOCS_DIR: docs
73+
LATEST_DOCS_DIR: latest
74+
RELEASE_BUILD: ${{ startsWith(github.ref, 'refs/tags/v') }}
75+
steps:
76+
- name: Download artifact
77+
uses: actions/download-artifact@v3
78+
with:
79+
name: docs
80+
81+
- name: Unpack artifact
82+
run: |
83+
mkdir ./${{ env.LATEST_DOCS_DIR }}
84+
tar -xzf ./docs.tar.gz -C ./${{ env.LATEST_DOCS_DIR }}
85+
86+
- name: Delete Artifact
87+
uses: geekyeggo/delete-artifact@v2
88+
with:
89+
name: docs
90+
91+
- name: Checkout latest Docs
92+
continue-on-error: true
93+
uses: actions/checkout@v3
94+
with:
95+
repository: ${{ env.DOCS_REPO }}
96+
path: ${{ env.DOCS_DIR }}
97+
ref: gh-pages
98+
99+
- name: Synchronize Docs
100+
run: |
101+
rm -rf ${{ env.DOCS_DIR }}/.git
102+
rm -rf ${{ env.DOCS_DIR }}/${{ env.DOCS_FOR }}/
103+
mkdir -p ${{ env.DOCS_DIR }}/${{ env.DOCS_FOR }}/
104+
cp -rf ${{ env.LATEST_DOCS_DIR }}/html/* ${{ env.DOCS_DIR }}/${{ env.DOCS_FOR }}/
105+
if [[ ${{ env.RELEASE_BUILD }} == false ]]; then
106+
rm -rf ${{ env.DOCS_DIR }}/${{ env.DOCS_FOR }}/page
107+
mkdir -p ${{ env.DOCS_DIR }}/${{ env.DOCS_FOR }}/page
108+
cp -rf ${{ env.LATEST_DOCS_DIR }}/rtdpage/* ${{ env.DOCS_DIR }}/${{ env.DOCS_FOR }}/page
109+
fi
110+
111+
- name: Validate Docs
112+
run: |
113+
if [ -z "$(ls -A ${{ env.DOCS_DIR }})" ]; then
114+
echo "Docs folder is empty. Aborting!"
115+
exit 1
116+
fi
117+
118+
- name: Github Pages Deploy
119+
uses: peaceiris/actions-gh-pages@v3
120+
with:
121+
personal_token: ${{ secrets.SOC_XIN_TOCKEN }}
122+
external_repository: ${{ env.DOCS_REPO }}
123+
publish_dir: ./${{ env.DOCS_DIR }}
124+
commit_message: Sync Docs

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# [STM32G030](https://doc.soc.xin/STM32G030)
1+
# [STM32G030](https://www.soc.xin/STM32G030)
2+
3+
[![Build Status](https://github.com/SoCXin/STM32G030/workflows/docs/badge.svg)](https://github.com/SoCXin/docs/tree/STM32G030)
24

35
* [ST](https://www.st.com/zh/): [Cortex-M0+](https://github.com/SoCXin/Cortex)
4-
* [L2R2](https://github.com/SoCXin/Level): 64 MHz , [LQFP-48 ¥3.93](https://item.szlcsc.com/549607.html)
6+
* [L2R2](https://github.com/SoCXin/Level): 64 MHz , [¥4.14(LQFP-48)](https://item.szlcsc.com/549607.html)
57

68
## [简介](https://github.com/SoCXin/STM32G030/wiki)
79

@@ -21,16 +23,16 @@
2123
* [参考文档](docs/)
2224
* [参考工程](project/)
2325

26+
可以使用[platform-stm32](https://github.com/OS-Q/platform-stm32)进行开发,支持Arduino等多种开发框架。
27+
2428
## [选型建议](https://github.com/SoCXin/STM32G030)
2529

2630
[STM32G030](https://item.szlcsc.com/549607.html)支持广泛的封装和内存组合,同时继承STM32强大的生态,特别适合成本敏感型应用。
2731

28-
[TSSOP-20](https://item.szlcsc.com/769428.html)单价¥2.67更具有性价比。但是相对而言这个封装定位的国产MCU还有很多有力的竞争者,例如[PY32F002](https://github.com/SoCXin/PY32F002),但都不及ST强大
32+
[TSSOP-20(¥2.67)](https://item.szlcsc.com/769428.html)具有很高的性价比。但是相对而言这个封装定位的国产MCU还有很多有力的竞争者,例如[PY32F002](https://github.com/SoCXin/PY32F002)
2933

3034
[STM32G031](https://www.st.com/content/st_com/zh/products/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus/stm32-mainstream-mcus/stm32g0-series/stm32g0x1.html) 相较 [STM32G030](https://www.st.com/content/st_com/zh/products/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus/stm32-mainstream-mcus/stm32g0-series/stm32g0x0-value-line.html) 模拟升级功能并增加安全功能,最主要的包括新增 USB-PD/CAN-FD/AES256,产品的型号规格更加丰富。
3135

32-
可以使用平台[platform-stm32](https://github.com/OS-Q/platform-stm32)进行开发,支持Arduino及多种开发框架。
33-
3436

3537
### 开源方案
3638

0 commit comments

Comments
 (0)