docs: expand HTML forms answers #5
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 forms docs (temporary) | |
| on: | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| expand-html-forms: | |
| if: github.head_ref == 'agent/expand-html-forms-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 forms answers | |
| run: python3 scripts/expand-html-forms.py | |
| - name: Format HTML page | |
| run: npx prettier src/pages/html/index.md --write | |
| - name: Preserve section spacing | |
| run: python3 scripts/fix-html-forms-spacing.py | |
| - 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 forms answers" | |
| git push origin HEAD:${{ github.head_ref }} |