mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-rest-api-docs.git
synced 2026-04-28 09:37:32 +08:00
Generate lightweight markdown versions of the API documentation that are more suitable for AI coding agents and LLMs. The current HTML output is ~4.2MB which is heavy for agents to process. - Add build-markdown.sh script that parses YAML front matter and concatenates includes into single markdown files - Update deploy workflow to generate markdown after Slate build - Output files: index.md, wp-api-v1.md, wp-api-v2.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
39 lines
852 B
YAML
39 lines
852 B
YAML
name: Deploy on push
|
|
on:
|
|
push:
|
|
branches:
|
|
- trunk
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
if: github.repository_owner == 'woocommerce'
|
|
name: Build and deploy
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Build
|
|
run: ./build.sh
|
|
- name: Generate markdown for AI agents
|
|
run: ./build-markdown.sh
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v5
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: build
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|