[books] Add Programming: Principles and Practice Using C++ (2nd Edition) #564
Workflow file for this run
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: Check - YAML | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| paths: | |
| - "**/*.yaml" | |
| - "!data/**" | |
| permissions: | |
| contents: read | |
| jobs: | |
| prettier: | |
| name: YAML | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - run: npm ci | |
| - name: Check formatting | |
| id: formatting | |
| run: | | |
| npm run format:yaml | |
| git diff -- ':(glob)**/*.yaml' ':(exclude)data/**' > formatting.diff | |
| if [[ -s formatting.diff ]]; then | |
| cat formatting.diff | |
| echo "::error::YAML formatting differs. Run: npm run format:yaml" | |
| exit 1 | |
| fi | |
| - name: Upload formatting diff | |
| if: failure() && steps.formatting.outcome == 'failure' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: formatting-diff-${{ github.event.number }}-yaml | |
| path: formatting.diff | |
| if-no-files-found: error | |
| retention-days: 7 |