You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Benjamin-Philip (via GitHub)" <gi...@apache.org> on 2026/06/29 09:42:19 UTC

[PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Benjamin-Philip opened a new pull request, #68:
URL: https://github.com/apache/arrow-erlang/pull/68

   ## What issue does this PR close?
   
   Closes #55.
   
   ## What's changed
   
   Pushes to main now deploy the docs to arrow.apache.org via the `asf-site` branch
   in addition to GitHub Pages itself.
   
   Implementation-wise, the document build and deploy tasks have been divided into
   separate jobs, each with requisite permissions and concurrency allowances. The
   "Test Document Generation" job in Erlang CI has also been removed in favour of
   performing the `build` job on PR in Docs CI.
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3496637689


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'

Review Comment:
   > Could you also add && github.repository != 'apache/arrow-erlang' to use this only on fork?
   
   Do you want to close the site at https://apache.github.io/arrow-erlang?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3498104948


##########
.github/workflows/docs.yml:
##########
@@ -80,11 +69,75 @@ jobs:
       - name: Generate docs
         run: rebar3 ex_doc
 
+      - name: Copy .asf.yaml
+        run: cp .asf.yaml doc
+
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main or on workflow dispatch
+    if: (github.ref_name == 'main' && github.event_name == 'push') || github.event_name == 'workflow_dispatch'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push' && github.repository == 'apache/arrow-erlang'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+      - name: Download artifact
+        uses: actions/download-artifact@v8
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: |
+          tar -xf docs/artifact.tar -C asf-site
+          rm asf-site/artifact.tar

Review Comment:
   We're using actions/upload-pages-artifact (as opposed upload-artifact) which uploads a zip of a directory containing the tarball of the website, so we still need to manually decompress `artifact.tar`.
   
   See https://github.com/actions/upload-pages-artifact#artifact-validation.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3534187049


##########
.github/workflows/docs.yml:
##########
@@ -85,8 +73,75 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  deploy_fork:
+    name: Deploy to GitHub Pages on fork
+    if: >-
+      (github.event_name == 'push' ||
+       github.event_name == 'workflow_dispatch') &&
+       github.repository != 'apache/arrow-erlang'
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push' && github.repository == 'apache/arrow-erlang'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
+        with:
+          persist-credentials: false
+
+      - name: Download artifact
+        uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: |
+          tar -xf docs/artifact.tar -C asf-site/main
+          cp .asf.yaml asf-site
+          cp .htaccess asf-site

Review Comment:
   I'm copying `.htaccess` here because I don't want to overwrite any configuration on HexDocs's side in-case they use Apache.
   
   Since I'm copying `.htaccess` here, I decided I'll copy `.asf.yaml` here as well.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3496683350


##########
.github/workflows/docs.yml:
##########
@@ -15,37 +15,24 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Generate Docs
+name: Docs CI
 on:
   push:
     branches:
       - main

Review Comment:
   I've kept on `on: workflow_dispatch: ` which allows me to manually trigger the workflow on a specified branch from the "Actions" tab in my fork.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3496712003


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}

Review Comment:
   tested: https://benjamin-philip.github.io/arrow-erlang-1/readme.html



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3498142584


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'

Review Comment:
   > But can we close it...?
   
   You'd have to disable GitHub Pages from the settings.
   
   > Yes. Because it will confuse users.
   
   We can take it down if you insist, but I think GitHub Pages could be used to serve docs from main, while we use asf-site for releases? Also it's always useful to have multiple mirrors in case one fails.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3541490971


##########
.github/workflows/docs.yml:
##########
@@ -15,34 +15,22 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Generate Docs
+name: Docs CI

Review Comment:
   It seems that "CI" is redundant. How about removing it?
   
   ```suggestion
   name: Docs
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4901237355

   We can track closing down the existing GitHub Pages site in a separate issue and PR, since a fix upstream in ASF infrastructure may take time.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3494520411


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'

Review Comment:
   Could you also add `&& github.repository != 'apache/arrow-erlang'` to use this only on fork?
   
   How about removing `github.ref_name == 'main`?
   
   If we remove it, we can use GitHub Pages on fork as a preview of PR.
   
   For example: apache/arrow-site does it:
   * A sample PR: https://github.com/apache/arrow-site/pull/729
   * Deploy to GitHub Pages: https://github.com/apache/arrow-site/blob/b097c84971be3f31724eb7c70df475b1104beca1/.github/workflows/deploy.yml#L138-L154
   * PR comment workflow: https://github.com/apache/arrow-site/blob/main/.github/workflows/pr_comment.yml



##########
.github/workflows/docs.yml:
##########
@@ -15,37 +15,24 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Generate Docs
+name: Docs CI
 on:
   push:
     branches:
       - main

Review Comment:
   Could you remove this to test this workflow on fork without creating a PR?
   
   
   ```suggestion
   ```



##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'

Review Comment:
   Could you also add `&& github.repository == 'apache/arrow-erlang'` to run this on only `apache/arrow-erlang`?



##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}

Review Comment:
   Have you tested this on your fork?
   
   https://github.com/apache/arrow-erlang/actions/runs/28364162213?pr=68#artifacts is `artifact.tar`. It seems that we need to extract it manually.



##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+      - name: Download artifact
+        uses: actions/download-artifact@v8
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: |
+          tar -xf docs/artifact.tar -C docs
+          rm docs/artifact.tar

Review Comment:
   How about using other directory (`asf-site`?) instead of reusing `docs/` directory for clean directory?
   
   
   ```suggestion
             tar -xf docs/artifact.tar -C asf-site
   ```



##########
.github/workflows/docs.yml:
##########
@@ -15,37 +15,24 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Generate Docs
+name: Docs CI
 on:
   push:
     branches:
       - main
-  workflow_dispatch:
-
-# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
-permissions:
-  contents: read
-  pages: write
-  id-token: write
+  pull_request:
 
-# Allow only one concurrent deployment
-concurrency:
-  group: "pages"
-  cancel-in-progress: true
+  workflow_dispatch:
 
 env:
   RUST_TOOLCHAIN_VERSION: stable
 
 jobs:
-  deploy:
+  build:

Review Comment:
   Can we add `permissions: contents: read` to this job?



##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+      - name: Download artifact
+        uses: actions/download-artifact@v8
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: |
+          tar -xf docs/artifact.tar -C docs
+          rm docs/artifact.tar
+          cp .asf.yaml ./docs/.asf.yaml

Review Comment:
   Can we add `.asf.yaml` to `artifact.tar` in the `build` job instead of adding `.asf.yaml` here?
   
   If we use the artifact as-is, it'll be easier to debug content a bit.



##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'

Review Comment:
   Should we publish `main` docs to https://arrow.apache.org/erlang/ ?
   
   I think that we should publish released version's docs to https://arrow.apache.org/erlang/ .
   
   If we want to publish non released version's docs, we can use sub path. For example, https://github.com/apache/arrow-adbc uses https://arrow.apache.org/adbc/main/ . The latest released version's docs are https://arrow.apache.org/adbc/current/ .



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3534174669


##########
.htaccess:
##########
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+ErrorDocument 404 /erlang/main/404.html
+
+RedirectMatch permanent ^/erlang/(?!main)(.*)$ https://arrow.hexdocs.pm/$1

Review Comment:
   I tested this on `httpd` version:
   
   ```
   Server version: Apache/2.4.68 (Fedora Linux)
   Server built:   Jun  9 2026 00:00:00
   ```
   
   I also aliased `DocumentRoot` to `/erlang/` to better match the ASF site's conditions:
   
   ```conf
   # Map DocumentRoot to /erlang
   
   <Location "/">
       Require all denied
   </Location>
   
   Alias "/erlang" "/home/bphilip/GitHub/arrow-erlang/doc"
   
   <Location "/erlang">
       Require all granted
   </Location>
   
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4911727650

   @kou, I've created an issue upstream: https://github.com/apache/infrastructure-asfyaml/issues/109.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3541930419


##########
.github/workflows/docs.yml:
##########
@@ -15,34 +15,22 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Generate Docs
+name: Docs CI

Review Comment:
   Fair. I appended "CI" to indicate that this is the workflow for Docs, Erlang or Rust. I'll remove those in a seperate PR.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3498266826


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'

Review Comment:
   If we want to correctly handle released versions, maybe we should delay this PR till the release scripts have been finalized?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3496537475


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+      - name: Download artifact
+        uses: actions/download-artifact@v8
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: |
+          tar -xf docs/artifact.tar -C docs
+          rm docs/artifact.tar

Review Comment:
   `docs` is clean because it's a separate job. I can use `asf-site` to make that more clear.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3497179020


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'

Review Comment:
   > One possible issue is that multiple consecutive PRs could overwrite each other's preview.
   
   Yes. But it'll not be a big problem in practice.
   
   > Do you want to close the site at https://apache.github.io/arrow-erlang?
   
   Yes. Because it will confuse users. But can we close it...?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4887076520

   It looks like we'll need update `dtolnay/rust-toolchain` to pass ASF allowlist. I'll rebase once the dependabot PR comes along. 
   
   Googling around, I read you could trigger one from the `Insights > Dependency graph > Dependabot` tab?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3502709193


##########
.github/workflows/docs.yml:
##########
@@ -80,11 +69,75 @@ jobs:
       - name: Generate docs
         run: rebar3 ex_doc
 
+      - name: Copy .asf.yaml
+        run: cp .asf.yaml doc
+
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main or on workflow dispatch
+    if: (github.ref_name == 'main' && github.event_name == 'push') || github.event_name == 'workflow_dispatch'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push' && github.repository == 'apache/arrow-erlang'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+      - name: Download artifact
+        uses: actions/download-artifact@v8
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: |
+          tar -xf docs/artifact.tar -C asf-site
+          rm asf-site/artifact.tar

Review Comment:
   🤦‍♂️. Ah yes, because we're using a clean working directory like you suggested earlier.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4849280313

   If we want to use hex.pm as our documentation site like we did for Go ( https://arrow.apache.org/go/ redirects to pkg.go.dev ), we can use only it.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4849474596

   I definitely don't want to break the existing pattern, so we can use Hexpm as our primary documentation site.
   
   However, I still want to be able to serve docs until we cut a release. Also, Hexpm will only serve docs for releases much like pkg.go.dev or docs.rs. So, I think it might be useful to have an alternate site serving docs from main?
   
   arrow-rs is serving from main on the ASF site, while docs.rs is handling serving all the versions. Maybe we could replicate this and shutdown GH Pages?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou merged PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4842831372

   I forgot to mention that when we publish a release to `hex.pm` (Erlang and Elixir's defacto package manager), we will also publish versioned docs to `hexdocs`.
   
   See https://hex.pm/docs/rebar3-publish for the exact process.
   
   With ASF site, GitHub Pages and HexDocs, there will 3 mirrors for documentation.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3502644721


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'

Review Comment:
   > You'd have to disable GitHub Pages from the settings.
   
   OK. It seems that we can't disable GitHub Pages by `.asf.yaml`: https://github.com/apache/infrastructure-asfyaml/blob/b898fe3bfcedd58c8e8bb1ae47526339bafd1b40/asfyaml/feature/github/pages.py#L93
   
   Could you open an issue for it at https://github.com/apache/infrastructure-asfyaml/issues ?
   
   > I think GitHub Pages could be used to serve docs from main, while we use asf-site for releases? Also it's always useful to have multiple mirrors in case one fails.
   
   Is it really useful...? Both of them have different contents (GitHub Pages provides docs for main ans arrow.apache.org/erlang provides docs for released versions). I feel that it's just inconvenient...



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3496537475


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+      - name: Download artifact
+        uses: actions/download-artifact@v8
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: |
+          tar -xf docs/artifact.tar -C docs
+          rm docs/artifact.tar

Review Comment:
   `docs` is clean because it's a separate job. I can use `asf-site` to make that more clear.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4888246499

   I can't find it in the tab.
   
   It seems that our comment (`# v1`) is wrong: https://github.com/apache/arrow-erlang/blob/0be5ff1ec329c3e3d31c99094a78806b694856d2/.github/workflows/rust-ci.yml#L42
   
   Dependabot may not work because of it... Let's update it manually in a separated PR.
   
   It seems that we need to use `# stable` based on:
   * https://github.com/apache/infrastructure-actions/pull/1000/changes
   * https://github.com/dtolnay/rust-toolchain/commit/4be7066ada62dd38de10e7b70166bc74ed198c30 


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4912327071

   I'm thinking even if these docs get published at arrow.apache.org, I'll only update arrow-site to reference it after our first release.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3502630233


##########
.github/workflows/docs.yml:
##########
@@ -80,11 +69,75 @@ jobs:
       - name: Generate docs
         run: rebar3 ex_doc
 
+      - name: Copy .asf.yaml
+        run: cp .asf.yaml doc
+
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main or on workflow dispatch
+    if: (github.ref_name == 'main' && github.event_name == 'push') || github.event_name == 'workflow_dispatch'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push' && github.repository == 'apache/arrow-erlang'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+      - name: Download artifact
+        uses: actions/download-artifact@v8
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: |
+          tar -xf docs/artifact.tar -C asf-site
+          rm asf-site/artifact.tar

Review Comment:
   I just wanted to say that we don't need `rm asf-site/artifact.tar` because it doesn't exist. (It exists under `docs/`.)
   
   ```suggestion
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3497208637


##########
.github/workflows/docs.yml:
##########
@@ -15,37 +15,24 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Generate Docs
+name: Docs CI
 on:
   push:
     branches:
       - main

Review Comment:
   > I could, but I would only be able to test on GitHub Pages.
   
   No problem. Could you remove it?
   



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4885826773

   Let's serve https://arrow.apache.org/erlang/main/ and redirect the rest to
   Hexpm. I'll create an issue in apache/infrastructure-asfyaml to take down the GH
   Pages site. I'll also go ahead with using GH Pages in forks as a preview.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4889673000

   My bad. I had put `# v1` because that was the last release.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3534360215


##########
.htaccess:
##########
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+ErrorDocument 404 /erlang/main/404.html
+
+RedirectMatch permanent ^/erlang/(?!main/)(.*)$ https://arrow.hexdocs.pm/$1

Review Comment:
   This RedirectMatch also matches `/erlang/main` (no trailing slash), because the negative lookahead only excludes `main/`. That would incorrectly redirect the main docs entry point to HexDocs instead of letting Apache serve (or redirect to) `/erlang/main/`.



##########
.github/workflows/pr_comment.yml:
##########
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: PR comment
+
+on: # zizmor: ignore[dangerous-triggers]
+  pull_request_target:
+    types:
+      - opened
+
+permissions:
+  contents: read
+  issues: write
+  pull-requests: write
+
+jobs:
+  preview-url:
+    name: Preview URL
+    if: github.event.pull_request.base.repo.full_name != 'apache/arrow-erlang'

Review Comment:
   The job condition checks the PR base repo, so it will *not* run for the common case of a PR opened against `apache/arrow-erlang` from a fork (where you likely want to comment the preview URL). It currently only runs for PRs whose base repo is not `apache/arrow-erlang`, which doesn’t match the PR description about PR previews on forks.



##########
CONTRIBUTING.md:
##########
@@ -120,3 +120,38 @@ Please read our [development
 documentation](https://arrow.apache.org/docs/developers/index.html) or
 look through the [New Contributor's
 Guide](https://arrow.apache.org/docs/developers/guide/index.html).
+
+### Forks
+
+We deploy a preview of the ExDoc documentation of any fork as a part of our
+tests.
+
+On a commit to all branches, the rendered static site will be
+published to GitHub Pages using GitHub Actions. The latest commit is
+only visible because all publications use the same url:
+https://${YOUR_GITHUB_ACCOUNT}.github.io/arrow-erlang/

Review Comment:
   A few phrasing/grammar issues make this section harder to follow ("as a part", "On a commit to all branches", and "url" → "URL"). Tightening the wording will reduce confusion for contributors configuring preview docs.



##########
.github/workflows/docs.yml:
##########
@@ -15,34 +15,22 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Generate Docs
+name: Docs CI
 on:
   push:
-    branches:
-      - main
-  workflow_dispatch:
-
-# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
-permissions:
-  contents: read
-  pages: write
-  id-token: write
+  pull_request:
 
-# Allow only one concurrent deployment
-concurrency:
-  group: "pages"
-  cancel-in-progress: true
+  workflow_dispatch:

Review Comment:
   `on: push` currently runs on *all* branches. Since `asf_site` deploys by pushing to the `asf-site` branch, that push will re-trigger this workflow (at least the `build` job), creating unnecessary CI churn and potential feedback loops.



##########
.github/workflows/pr_comment.yml:
##########
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: PR comment
+
+on: # zizmor: ignore[dangerous-triggers]
+  pull_request_target:
+    types:
+      - opened
+
+permissions:
+  contents: read
+  issues: write
+  pull-requests: write
+
+jobs:
+  preview-url:
+    name: Preview URL
+    if: github.event.pull_request.base.repo.full_name != 'apache/arrow-erlang'
+    runs-on: ubuntu-latest
+    steps:
+      - name: Comment
+        env:
+          GH_TOKEN: ${{ github.token }}
+          PR_REPOSITORY: ${{ github.event.pull_request.base.repo.full_name }}
+          FORK_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
+          PR_NUMBER: ${{ github.event.number }}
+        run: |
+          configure_url="https://github.com/apache/arrow-erlang/blob/main/CONTRIBUTING.md#forks"
+          fork_owner=${FORK_REPOSITORY%/*}
+          fork_repository=${FORK_REPOSITORY#*/}
+          {
+            echo "Preview URL: https://${fork_owner}.github.io/${fork_repository}"
+            echo ""
+            echo "If the preview URL doesn't work, you may forget to configure your fork repository for preview."
+            echo "See ${configure_url} how to configure."
+          } | tee body.md
+          gh pr comment ${PR_NUMBER} \
+            --body-file body.md \
+            --repo ${PR_REPOSITORY}

Review Comment:
   Minor grammar in the comment body ("may forget" → "may have forgotten") and unquoted shell variables in the `gh pr comment` invocation. Quoting reduces the chance of surprising behavior if values ever contain special characters.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3534441505


##########
.github/workflows/docs.yml:
##########
@@ -15,34 +15,22 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Generate Docs
+name: Docs CI
 on:
   push:
-    branches:
-      - main
-  workflow_dispatch:
-
-# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
-permissions:
-  contents: read
-  pages: write
-  id-token: write
+  pull_request:
 
-# Allow only one concurrent deployment
-concurrency:
-  group: "pages"
-  cancel-in-progress: true
+  workflow_dispatch:

Review Comment:
   The `asf_site` and `deploy_fork` jobs will not execute due to the `if` checks. The `build` job is just a check, so it's fine if it run.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3534174669


##########
.htaccess:
##########
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+ErrorDocument 404 /erlang/main/404.html
+
+RedirectMatch permanent ^/erlang/(?!main)(.*)$ https://arrow.hexdocs.pm/$1

Review Comment:
   I tested this on `httpd` version:
   
   ```
   Server version: Apache/2.4.68 (Fedora Linux)
   Server built:   Jun  9 2026 00:00:00
   ```
   
   I also aliased `DocumentRoot` to `/erlang/` in my `httpd.conf` to better match the ASF site's conditions:
   
   ```conf
   # Map DocumentRoot to /erlang
   
   <Location "/">
       Require all denied
   </Location>
   
   Alias "/erlang" "/home/bphilip/GitHub/arrow-erlang/doc"
   
   <Location "/erlang">
       Require all granted
   </Location>
   
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#issuecomment-4879796999

   I'm OK that we use Hexpm for released documentations but I don't want to use https://arrow.apache.org/erlang/ for documentation for the main branch because users may access to https://arrow.apache.org/erlang/ .
   
   We should provide documentations of released versions for users. Documentations for main (not released) should be only for Apache Arrow developers.
   
   How about setting redirect to Hexpm for https://arrow.apache.org/erlang/ and putting the documentation for main to https://arrow.apache.org/erlang/main/ or something?
   
   > shutdown GH Pages?
   
   Could you do https://github.com/apache/arrow-erlang/pull/68#discussion_r3502644721 for it?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3497228816


##########
.github/workflows/docs.yml:
##########
@@ -80,11 +69,75 @@ jobs:
       - name: Generate docs
         run: rebar3 ex_doc
 
+      - name: Copy .asf.yaml
+        run: cp .asf.yaml doc
+
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main or on workflow dispatch
+    if: (github.ref_name == 'main' && github.event_name == 'push') || github.event_name == 'workflow_dispatch'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push' && github.repository == 'apache/arrow-erlang'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+      - name: Download artifact
+        uses: actions/download-artifact@v8
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: |
+          tar -xf docs/artifact.tar -C asf-site
+          rm asf-site/artifact.tar

Review Comment:
   We don't need this now.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3490805993


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,65 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5

Review Comment:
   `actions/upload-pages-artifact` is uploading the Pages artifact with a custom name (`docs-${{ github.sha }}`), but `actions/deploy-pages` will look for the default `github-pages` artifact unless `artifact_name` is set. This will cause the GitHub Pages deployment job to fail to find the artifact.



##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,65 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+
+
+  asf_site:
+  # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+      - name: Download artifact
+        uses: actions/download-artifact@v8
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: cp .asf.yaml ./docs/.asf.yaml

Review Comment:
   The artifact produced by `actions/upload-pages-artifact` contains `artifact.tar` (not an extracted site directory), so publishing `docs/` as-is will push a tarball to `asf-site` instead of the rendered docs. Also, `actions/download-artifact@v8` does not exist (current major is v5). Download with v5 and extract `artifact.tar` before publishing.



##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,65 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'
+    name: Deploy to GitHub Pages
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@v5
+
+
+  asf_site:
+  # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'

Review Comment:
   The comment above the `asf_site` job is not indented under the job key, which makes the YAML harder to read and easy to misinterpret as applying at the `jobs:` level. Indent it to align with the rest of the job fields.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Benjamin-Philip (via GitHub)" <gi...@apache.org>.
Benjamin-Philip commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3496584871


##########
.github/workflows/docs.yml:
##########
@@ -83,8 +70,70 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v5
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  gh_pages:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push'

Review Comment:
   One possible issue is that multiple consecutive PRs could overwrite each other's preview.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore: Publish docs to arrow.apache.org [arrow-erlang]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #68:
URL: https://github.com/apache/arrow-erlang/pull/68#discussion_r3534237499


##########
.github/workflows/docs.yml:
##########
@@ -85,8 +73,75 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
         with:
+          name: docs-${{ github.sha }}
           path: 'doc'
 
-      - name: Deploy to GitHub Pages
-        id: deployment
+  deploy_fork:
+    name: Deploy to GitHub Pages on fork
+    if: >-
+      (github.event_name == 'push' ||
+       github.event_name == 'workflow_dispatch') &&
+       github.repository != 'apache/arrow-erlang'
+    needs: build
+
+    # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "pages"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - id: deployment
         uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
+        with:
+           artifact_name: docs-${{ github.sha }}
+
+
+  asf_site:
+    # Only deploy on a push to main
+    if: github.ref_name == 'main' && github.event_name == 'push' && github.repository == 'apache/arrow-erlang'
+    name: Deploy to arrow.apache.org
+    needs: build
+
+    permissions:
+      contents: write
+
+    # Allow only one concurrent deployment
+    concurrency:
+      group: "asf_site"
+      cancel-in-progress: true
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
+        with:
+          persist-credentials: false
+
+      - name: Download artifact
+        uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
+        with:
+          name: docs-${{ github.sha }}
+          path: docs
+      - name: Prepare website
+        run: |
+          tar -xf docs/artifact.tar -C asf-site/main
+          cp .asf.yaml asf-site
+          cp .htaccess asf-site

Review Comment:
   The workflow extracts the docs artifact into `asf-site/main`, but that directory doesn’t exist in the repository. `tar -C asf-site/main` will fail unless the directory is created first.



##########
.htaccess:
##########
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+ErrorDocument 404 /erlang/main/404.html
+
+RedirectMatch permanent ^/erlang/(?!main)(.*)$ https://arrow.hexdocs.pm/$1

Review Comment:
   This redirect excludes any path starting with `main` (e.g. `/erlang/mainly`) from redirecting to HexDocs. If the intent is to only keep `/erlang/main` (and its subpaths) on arrow.apache.org, tighten the negative lookahead to `main(/|$)`.



##########
.github/workflows/pr_comment.yml:
##########
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: PR comment
+
+on: # zizmor: ignore[dangerous-triggers]
+  pull_request_target:
+    types:
+      - opened
+
+permissions:
+  contents: read
+  issues: write
+  pull-requests: write
+
+jobs:
+  preview-url:
+    name: Preview URL
+    runs-on: ubuntu-latest
+    steps:

Review Comment:
   This workflow comments a "Preview URL" for every opened PR, including PRs from branches within `apache/arrow-erlang`. In that case the URL points at `https://apache.github.io/...`, which typically isn’t configured and is misleading. Consider only commenting when the PR comes from a fork.



##########
CONTRIBUTING.md:
##########
@@ -120,3 +120,38 @@ Please read our [development
 documentation](https://arrow.apache.org/docs/developers/index.html) or
 look through the [New Contributor's
 Guide](https://arrow.apache.org/docs/developers/guide/index.html).
+
+### Forks
+
+We deploy a preview of the ExDoc documentation of any fork as a part of our
+tests.
+
+On a commit to all branches, the rendered static site will be
+published to GitHub Pages using GitHub Actions. The latest commit is
+only visible because all publications use the same url:
+https://${YOUR_GITHUB_ACCOUNT}.github.io/arrow-erlang/
+
+You need to configure your fork repository to use this feature:
+
+1. Enable GitHub Pages on your fork:
+   1. Open https://github.com/${YOUR_GITHUB_ACCOUNT}/arrow-erlang/settings/pages
+   2. Select "GitHub Actions" as "Source"
+2. Accept publishing GitHub Pages from all branches on your fork:
+   1. Open https://github.com/${YOUR_GITHUB_ACCOUNT}/arrow-erlang/settings/environments
+   2. Select the "github-pages" environment
+   3. Change the default "Deployment branches and tags" rule:
+      1. Press the "Edit" button
+      2. Change the "Name pattern" to `*` from `main` or `gh-pages`
+
+See also the [GitHub Pages
+documentation](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow).
+
+
+FYI: You can also generate the site for https://arrow.apache.org/arrow-erlang/main

Review Comment:
   This URL path doesn’t match the deployment described in the PR (and the `.asf.yaml` homepage). It should be `/erlang/main/`, not `/arrow-erlang/main`.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org