You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by ja...@apache.org on 2026/05/01 15:14:11 UTC

(grails-static-website) 02/02: Wire buildAllGuides into publishMainSite so guides ship under grails.apache.org/guides/ (refs #354)

This is an automated email from the ASF dual-hosted git repository.

jamesfredley pushed a commit to branch phase-12-url-switch
in repository https://gitbox.apache.org/repos/asf/grails-static-website.git

commit 7183ea6f63bdf1899d276f1796c06f89c2ffd2d5
Author: James Fredley <ja...@users.noreply.github.com>
AuthorDate: Fri May 1 11:14:03 2026 -0400

    Wire buildAllGuides into publishMainSite so guides ship under grails.apache.org/guides/ (refs #354)
    
    publishMainSite now also depends on buildAllGuides, so the rendered guide corpus under build/dist/guides/<name>/<v>/ mirrors into apache/grails-website asf-site-production alongside the main site. publish.yml has been updated to document the new shape; no separate guides-publish step is added.
    
    Assisted-by: claude-code:claude-4.6-opus
---
 .github/workflows/publish.yml                               | 13 ++++++++-----
 .../groovy/website/gradle/tasks/PublishMainSiteTask.groovy  |  3 +++
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index aa984a33887..00988c3692b 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -53,8 +53,11 @@ jobs:
           GH_TOKEN: ${{ secrets.GRAILS_GHTOKEN }}
           GH_BRANCH: asf-site-production
           GRAILS_WS_URL: https://grails.apache.org
-      # NOTE: A previous "Publish Guides Site" step that pushed to
-      # grails-guides/grails-guides-template gh-pages was removed as part
-      # of issue #354. https://guides.grails.org/ is served from that
-      # frozen gh-pages branch until the new canonical location at
-      # https://grails.apache.org/guides/ is fully cut over.
+      # The publishMainSite Gradle task depends on both `build` and
+      # `buildAllGuides`, so the rendered guide corpus under
+      # build/dist/guides/<name>/<v>/ is mirrored into the deploy repo as
+      # part of the same step, making https://grails.apache.org/guides/
+      # the canonical guide location served by apache/grails-website.
+      # https://guides.grails.org/ remains alive serving frozen content
+      # from grails-guides/grails-guides-template gh-pages until Phase 15
+      # of issue #354 swaps it for redirect stubs.
diff --git a/buildSrc/src/main/groovy/website/gradle/tasks/PublishMainSiteTask.groovy b/buildSrc/src/main/groovy/website/gradle/tasks/PublishMainSiteTask.groovy
index af18a6c45af..c474d64ea1c 100644
--- a/buildSrc/src/main/groovy/website/gradle/tasks/PublishMainSiteTask.groovy
+++ b/buildSrc/src/main/groovy/website/gradle/tasks/PublishMainSiteTask.groovy
@@ -159,6 +159,9 @@ abstract class PublishMainSiteTask extends DefaultTask {
     static TaskProvider<PublishMainSiteTask> register(Project project) {
         project.tasks.register(NAME, PublishMainSiteTask) { PublishMainSiteTask task ->
             task.dependsOn('build')
+            // Also include the vendored guide corpus so build/dist/guides/<name>/<v>/
+            // ships alongside the main site under https://grails.apache.org/guides/.
+            task.dependsOn('buildAllGuides')
             task.gitHubSlug.convention(
                     project.providers.environmentVariable('GITHUB_SLUG')
                             .orElse(DEFAULT_GITHUB_SLUG))