Skip to content

Update SDK docs

Update SDK docs #15

Workflow file for this run

name: Update SDK docs
on:
schedule:
- cron: "0 0 * * *" # Runs at 00:00 UTC every day
workflow_dispatch: # Allows manual triggering
jobs:
update-sdk-pages:
runs-on: ubuntu-slim
permissions:
contents: write
pull-requests: write
env:
FRONTEND_REF: main
steps:
- name: Checkout current repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: docs
- name: Checkout sdk repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: tailor-platform/sdk
ref: ${{ env.FRONTEND_REF }}
path: sdk
- name: Set up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Install dependencies for docs-sync script
working-directory: docs/scripts/docs-sync
run: npm ci
- name: Sync the docs files
working-directory: docs/scripts/docs-sync
run: npm start -- sdk
- name: Check for changes
working-directory: docs
id: git_diff
run: |
git config --global --add safe.directory $PWD
if git diff --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: steps.git_diff.outputs.changed == 'true'
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
path: docs
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update SDK pages
branch: update-sdk-pages
title: Update SDK pages
body: Auto-created by the update_sdk_docs workflow.
base: main
labels: DOCS