Skip to content

update-docs

update-docs #49

Workflow file for this run

name: Sync API Documentation
on:
# Remote trigger from remix repo (post release process)
repository_dispatch:
types: [update-docs]
# Manual trigger from remix-api-docs repo
workflow_dispatch:
inputs:
tag:
description: "Remix Tag (i.e., remix@3.0.0)"
required: true
jobs:
docs:
name: Sync API Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout remix-api-docs
uses: actions/checkout@v6
with:
path: remix-api-docs
ref: main
- name: Checkout remix
uses: actions/checkout@v6
with:
repository: remix-run/remix
path: remix
ref: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.tag || github.event.inputs.tag }}
fetch-depth: 0
fetch-tags: true
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: "pnpm"
cache-dependency-path: remix/pnpm-lock.yaml
- name: Install Remix dependencies
id: remix
working-directory: remix
run: |
pnpm install --frozen-lockfile
echo "remix_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Sync Docs
working-directory: remix-api-docs
run: |
./sync.sh ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.tag || github.event.inputs.tag }}
git add docs/
if [ -z "$(git status --porcelain)" ]; then
echo "No changes detected"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Updated API documentation - remix SHA ${{ steps.remix.outputs.remix_sha }}"
git push
echo "Pushed docs changes https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)"