> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. # Orchestrate releases > Automate docs releases based on GitHub repository releases. Set up workflows to trigger auto-merge PRs when features ship. Fern Docs supports orchestrating documentation releases based on releases from other repositories. This is useful when documenting features that depend on releases in other repositories. This requires two GitHub Actions: one in the feature repository and one in the documentation repository. #### Set up release notification in the feature repository Add this GitHub Action workflow to the repository where features are released. When a new release is created with the specified tag pattern, this workflow will send a notification to your documentation repository, triggering the auto-merge process. Replace the following placeholders with your own values: * ``: GitHub token with `repo` scope * ``: Organization containing the docs repository * ``: Docs repository name * ``: Product release tag **`.github/workflows/notify-docs-repo.yml`** ```yml title=".github/workflows/notify-docs-repo.yml" name: Notify Docs Repo on: release: types: [created] jobs: notify-docs: runs-on: ubuntu-latest if: startsWith(github.event.release.tag_name, '@') steps: - name: Trigger docs repo workflow run: | curl -f -X POST \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token ${{ secrets. }}" \ https://api.github.com/repos///dispatches \ -d '{"event_type":"","client_payload":{"version":"${{ github.ref_name }}"}}' ``` #### Configure auto-merge in the documentation repository Add this GitHub Action workflow to your documentation repository to auto-merge PRs when features are released. Replace `` with your product release tag. **`.github/workflows/auto-merge-on-release.yml`** ```yml title=".github/workflows/auto-merge-on-release.yml" name: Auto-merge on Docs Release on: repository_dispatch: types: [] jobs: merge-dependent-prs: runs-on: ubuntu-latest steps: - name: Find and merge dependent PRs uses: actions/github-script@v7 with: script: | const version = context.payload.client_payload.version; // Find PRs with matching labels const { data: prs } = await github.rest.pulls.list({ owner: context.repo.owner, repo: context.repo.repo, state: 'open' }); for (const pr of prs) { const labels = pr.labels.map(l => l.name); const hasLatestLabel = labels.includes('depends-on: @latest'); const hasVersionLabel = labels.includes(`depends-on: @${version}`); if (hasLatestLabel || hasVersionLabel) { // Check if PR is approved const { data: reviews } = await github.rest.pulls.listReviews({ owner: context.repo.owner, repo: context.repo.repo, pull_number: pr.number }); const approved = reviews.some(r => r.state === 'APPROVED'); if (approved) { await github.rest.pulls.merge({ owner: context.repo.owner, repo: context.repo.repo, pull_number: pr.number, merge_method: 'squash' }); console.log(`Merged PR #${pr.number}: ${pr.title}`); } } } ``` > Automate docs releases based on GitHub repository releases. Set up workflows to trigger auto-merge PRs when features ship.