docs: expand HTML accessibility answers #2
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: Expand HTML accessibility docs (temporary) | |
| on: | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| expand-html-accessibility: | |
| if: github.head_ref == 'agent/expand-html-accessibility-answers' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Expand HTML accessibility answers | |
| run: python3 scripts/expand-html-accessibility.py | |
| - name: Remove temporary source markers | |
| run: | | |
| python3 - <<'PY' | |
| from pathlib import Path | |
| p = Path('src/pages/html/index.md') | |
| text = p.read_text() | |
| for marker in [ | |
| ' citeturn213584search0', | |
| ' citeturn213584search4', | |
| ' citeturn213584search1', | |
| ]: | |
| text = text.replace(marker, '') | |
| p.write_text(text) | |
| PY | |
| - name: Format HTML page | |
| run: npx prettier src/pages/html/index.md --write | |
| - name: Commit formatted page | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| git add src/pages/html/index.md | |
| git diff --cached --quiet && exit 0 | |
| git commit -m "docs: expand HTML accessibility answers" | |
| git push origin HEAD:${{ github.head_ref }} |