SiyaoIsHiding commented on code in PR #2063:
URL: 
https://github.com/apache/cassandra-java-driver/pull/2063#discussion_r2611600311


##########
.github/workflows/update-docs-staging.yml:
##########
@@ -0,0 +1,81 @@
+name: Update gh-pages-staging on commit
+
+on:
+  push:
+    branches:
+      - 4.x
+  workflow_dispatch:
+
+jobs:
+  build-docs:
+    runs-on: ubuntu-latest
+    permissions:
+      contents: write
+
+    steps:
+      # 1. Checkout doc branch
+      - name: Checkout current branch
+        uses: actions/checkout@v4
+        with:
+          path: java-driver
+
+      # 2. Java 8
+      - name: Set up Java 8
+        uses: actions/setup-java@v4
+        with:
+          distribution: temurin
+          java-version: "8"
+          cache: maven        # <--- cache Maven deps (~/.m2/repository)
+
+      # 3. Python 3.10.19 + MkDocs + plugins
+      - name: Set up Python 3.10.19
+        uses: actions/setup-python@v5
+        with:
+          python-version: "3.10.19"
+
+      - name: Install MkDocs dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install \
+            mkdocs \
+            mkdocs-material \
+            mkdocs-awesome-pages-plugin \
+            mkdocs-macros-plugin
+
+      # 4. Build docs via build-doc.sh
+      - name: Build documentation
+        working-directory: java-driver
+        run: |
+          chmod +x ./build-doc.sh
+          ./build-doc.sh
+
+
+      # 6. Checkout gh-pages-staging branch
+      - name: Checkout gh-pages-staging
+        uses: actions/checkout@v4
+        with:
+          ref: gh-pages-staging
+          path: gh-pages-staging
+
+      - name: Copy and Build Doc
+        working-directory: gh-pages-staging
+        run: |
+          cp -r ../java-driver/docs ./docs/latest
+          mkdocs build
+          cp -r ./out/. .      # because the index.html has to be in the root 
folder

Review Comment:
   `mv` instead of cp



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to