From 3320344929c69de61021d9c61d619f77108b7262 Mon Sep 17 00:00:00 2001 From: gsh1209 Date: Sat, 18 Apr 2026 14:41:20 +0800 Subject: [PATCH] feat: stop tracking wifi_config.h and update CI workflow Signed-off-by: gsh1209 --- .github/workflows/build.yml | 4 ++++ .gitignore | 1 + README.md | 8 ++++++++ code/{wifi_config.h => wifi_config.h.example} | 0 4 files changed, 13 insertions(+) rename code/{wifi_config.h => wifi_config.h.example} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fed3899d0..1cfc29fa5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,10 @@ jobs: arduino-cli lib install "pdulib" arduino-cli lib install "ReadyMail" + - name: Generate wifi_config.h + run: | + cp code/wifi_config.h.example code/wifi_config.h + - name: Compile firmware run: | arduino-cli compile --fqbn esp32:esp32:esp32c3 ./code/code.ino diff --git a/.gitignore b/.gitignore index 0bb36eb30..3f399fcfa 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ code/wifi_config.h +!*.example diff --git a/README.md b/README.md index 890a027b2..e79c45f93 100644 --- a/README.md +++ b/README.md @@ -107,3 +107,11 @@ ESP32C3 与 ML307R-DC 通过串口(UART)连接,接线如下: - **pdulib** by David Henry 需要在`Arduino IDE`中安装ESP32开发板支持,参考[官方文档](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html),版型选`MakerGO ESP32 C3 SuperMini`。 + +## 软件编译 + +克隆仓库后,复制 WiFi 信息配置文件模板,并填入 WiFi SSID 和 WiFi 密码: + +```bash +cp code/wifi_config.h.example code/wifi_config.h +``` diff --git a/code/wifi_config.h b/code/wifi_config.h.example similarity index 100% rename from code/wifi_config.h rename to code/wifi_config.h.example