Skip to content

Publish docs

Publish docs #35

Workflow file for this run

name: Publish docs
on:
push:
tags:
- '*.*.*'
workflow_dispatch:
jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- run: npm i -g @automattic/vip
- run: node ./helpers/generate-docs.js > /tmp/docs.json
- name: Print docs.json
run: cat /tmp/docs.json
- name: Send docs to docs site
env:
DOCS_SECRET_TOKEN: ${{ secrets.DOCS_SECRET_TOKEN }}
run: |
curl -X PUT -v \
-H "Authorization: Bearer $DOCS_SECRET_TOKEN" \
-H "Content-Type: application/json" \
--data "@/tmp/docs.json" \
https://docs.wpvip.com/wp-json/cli-command-reference/v1/ingest/vip-cli