Skip to content

Cross-repo documentation deployment from monorepo#242

Merged
edburns merged 3 commits into
mainfrom
edburns/dd-3009225-build-documentation-process
Jun 1, 2026
Merged

Cross-repo documentation deployment from monorepo#242
edburns merged 3 commits into
mainfrom
edburns/dd-3009225-build-documentation-process

Conversation

@edburns
Copy link
Copy Markdown
Collaborator

@edburns edburns commented Jun 1, 2026

Rewrites deploy-site.yml to build the Maven Site from the monorepo (github/copilot-sdk) at a release tag and deploy to this repo's gh-pages branch. Triggered by the monorepo's java-publish-maven.yml workflow.

Changes

  • .github/workflows/deploy-site.yml: Complete rewrite for cross-repo builds
    • Only triggered by workflow_dispatch (no more release/workflow_run triggers)
    • Checks out github/copilot-sdk at the monorepo tag for Java source
    • Builds Maven Site from monorepo/java/
    • Deploys to gh-pages with version directory and optional /latest/ symlink
    • Version list built from deployed directories (no tags in this repo)
  • .github/templates/index.html: Updated 'View on GitHub' and footer links to point to monorepo

Secrets required

  • MONOREPO_READ_TOKEN: PAT with contents:read on github/copilot-sdk (or default token if monorepo is readable)

Companion PR

github/copilot-sdk#1524 — adds site infrastructure and deploy-site trigger job

Replace the self-contained site build workflow with one that:
- Is triggered only by workflow_dispatch (from the monorepo's release workflow)
- Accepts version, publish_as_latest, and monorepo_tag inputs
- Checks out github/copilot-sdk at the release tag for source code
- Builds the Maven Site from the monorepo's java/ directory
- Deploys to this repo's gh-pages branch
- Detects versions from deployed directories (no tags needed in this repo)

Also update index.html template links to point to the monorepo
(github/copilot-sdk/tree/main/java) instead of this archived repo.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 1, 2026 06:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reworks the documentation deployment pipeline so this repository publishes the Maven Site generated from the github/copilot-sdk monorepo (checked out at a release tag) and publishes the resulting static site content to this repo’s GitHub Pages.

Changes:

  • Rewrites deploy-site.yml to (a) checkout the monorepo at a provided tag, (b) build monorepo/java Maven Site, and (c) publish versioned docs directories (plus optional /latest/).
  • Updates the docs landing page template links to point to the monorepo’s java/ folder.
Show a summary per file
File Description
.github/workflows/deploy-site.yml New cross-repo build + versioned site publishing logic (monorepo source, gh-pages content management, directory-based version list).
.github/templates/index.html Updates repository links to the monorepo java/ location.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

.github/workflows/deploy-site.yml:201

  • This job both (1) force-pushes updates to the gh-pages branch and (2) runs configure-pages + upload-pages-artifact + deploy-pages. Those are two different GitHub Pages publishing modes; keeping both can cause duplicate deployments or failures depending on the repo’s Pages source setting, and it also makes the step naming ambiguous (two steps named "Deploy to GitHub Pages").
      # 10. Push to gh-pages
      - name: Deploy to GitHub Pages
        run: |
          cd site
          git config user.name "github-actions[bot]"
          git config user.email "github-actions[bot]@users.noreply.github.com"

          git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" 2>/dev/null || \
            git remote add origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"

          git add -A

          COMMIT_MSG="Deploy documentation: ${{ inputs.version }} (from ${{ inputs.monorepo_tag }})"
          git diff --staged --quiet || git commit -m "$COMMIT_MSG"

          git push -u origin gh-pages --force
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Setup Pages
        uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

      - name: Upload artifact
        uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
        with:
          path: 'site'

      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0

  • Files reviewed: 2/2 changed files
  • Comments generated: 4

Comment thread .github/workflows/deploy-site.yml Outdated
Comment thread .github/workflows/deploy-site.yml
Comment thread .github/workflows/deploy-site.yml Outdated
Comment thread .github/workflows/deploy-site.yml Outdated
Site content (src/site/) and a site-building POM now live in this repo.
The deploy-site.yml workflow checks out the monorepo at the release tag
for Java source (javadoc, JaCoCo, SpotBugs), but uses the local pom.xml
and src/site/ for site structure and content.

Key changes:
- Add pom.xml (site-only, packaging=pom) with reporting plugins
- Add src/site/ (markdown docs, site.xml, CSS, JaCoCo overlay)
- Update deploy-site.yml: no longer checks out standalone into subdir;
  runs mvn site from repo root using local POM + monorepo source

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edburns edburns merged commit 1e01ae3 into main Jun 1, 2026
3 checks passed
@edburns edburns deleted the edburns/dd-3009225-build-documentation-process branch June 1, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants