Update 01-DPS-METERS.md #66
This file contains hidden or 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: Combine Markdown Files | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| combine: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🧰 Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: 🐍 Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: 📦 Show environment details | |
| run: | | |
| echo "Python version:" | |
| python --version | |
| echo "Working directory:" | |
| pwd | |
| echo "Files in repo root:" | |
| ls -al | |
| - name: Install markdown library | |
| run: pip install markdown | |
| - name: 🧩 Run combine_markdowns script with logging | |
| run: | | |
| echo "===== Running combine_markdowns.py =====" | |
| python .github/scripts/combine_markdowns.py | |
| echo "===== Script finished. Log file contents: =====" | |
| cat combine_markdowns.log || echo "No log file found." | |
| echo "===== README.md preview (first 30 lines): =====" | |
| head -n 30 README.md || echo "README.md not found!" | |
| - name: 📝 Commit and push README.md (always attempt) | |
| run: | | |
| echo "===== Checking for changes =====" | |
| git status | |
| git diff --stat README.md list.html || echo "No diff available." | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add README.md combine_markdowns.log list.html || echo "Nothing to add" | |
| git commit -m "Auto-update combined README.md [skip ci]" || echo "No changes to commit" | |
| git push || echo "Nothing to push" | |
| - name: ✅ Workflow summary | |
| run: | | |
| echo "===== Final repository state =====" | |
| git status | |
| echo "===== Recent commits =====" | |
| git log -n 3 --oneline |