From 148b7cb36b822afe2fa399aec5ee305e797d8411 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Mon, 29 Jun 2026 15:04:01 +0530 Subject: [PATCH 01/27] Publish docs to arrow.apache.org --- .github/workflows/docs.yml | 84 ++++++++++++++++++++++++++------- .github/workflows/erlang-ci.yml | 3 ++ 2 files changed, 71 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f4be4a7..e021e20 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,29 +15,21 @@ # 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: + name: Build Docs runs-on: ubuntu-latest environment: name: github-pages @@ -85,8 +77,68 @@ 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 - uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 + 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: | + tar -xf docs/artifact.tar -C docs + rm docs/artifact.tar + cp .asf.yaml ./docs/.asf.yaml + - name: Deploy to ASF + uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs + publish_branch: asf-site + # Avoid accumulating history of in progress API jobs: https://github.com/apache/arrow-rs/issues/5908 + force_orphan: true diff --git a/.github/workflows/erlang-ci.yml b/.github/workflows/erlang-ci.yml index 9bb1e0d..bdfe9d6 100644 --- a/.github/workflows/erlang-ci.yml +++ b/.github/workflows/erlang-ci.yml @@ -131,6 +131,7 @@ jobs: - name: Run dialyzer run: rebar3 dialyzer +<<<<<<< HEAD docbuild_test: name: Test Generate the Docs @@ -174,3 +175,5 @@ jobs: - name: Generate Docs run: rebar3 ex_doc +======= +>>>>>>> 3f77acb (Publish docs to arrow.apache.org) From f1f6144ed53c04473a1c5ddfb6dc769860c4b606 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Mon, 29 Jun 2026 15:13:23 +0530 Subject: [PATCH 02/27] Fix Build Docs environment --- .github/workflows/docs.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e021e20..d4d9e09 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -31,10 +31,6 @@ jobs: build: name: Build Docs runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: From 6e40d088cc97fd19eff2018236343c7d2dc1b9d8 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Mon, 29 Jun 2026 15:18:46 +0530 Subject: [PATCH 03/27] Offload decompression to download-archive --- .github/workflows/docs.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d4d9e09..66a7fb3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -126,10 +126,7 @@ jobs: 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 + run: cp .asf.yaml ./docs/.asf.yaml - name: Deploy to ASF uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 with: From 957731fea8785309312ed7a5a21e8b992ce7a126 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Mon, 29 Jun 2026 15:28:12 +0530 Subject: [PATCH 04/27] Correctly pass artifact name to github pages --- .github/workflows/docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 66a7fb3..c4a9533 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -101,6 +101,8 @@ jobs: steps: - id: deployment uses: actions/deploy-pages@v5 + with: + artifact_name: docs-${{ github.sha }} asf_site: From 27825178c47cede22223ba835ae239efbad29d64 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Mon, 29 Jun 2026 15:31:15 +0530 Subject: [PATCH 05/27] Revert "Offload decompression to download-archive" This reverts commit 7376fc20bf4a629aa150224bf8d691a17b31684b. upload-pages-archive uploads a tarball inside the gzip. --- .github/workflows/docs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c4a9533..fba3b39 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -128,7 +128,10 @@ jobs: name: docs-${{ github.sha }} path: docs - name: Prepare website - run: cp .asf.yaml ./docs/.asf.yaml + run: | + tar -xf docs/artifact.tar -C docs + rm docs/artifact.tar + cp .asf.yaml ./docs/.asf.yaml - name: Deploy to ASF uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 with: From d45057fcf09c710a2c5fc1bd1196d7893cb3c6f3 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Mon, 29 Jun 2026 15:32:39 +0530 Subject: [PATCH 06/27] Fix formatting --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fba3b39..13088ff 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -106,7 +106,7 @@ jobs: asf_site: - # Only deploy on a push to main + # Only deploy on a push to main if: github.ref_name == 'main' && github.event_name == 'push' name: Deploy to arrow.apache.org needs: build From 722a99b3867bc93da720a7f810fe32fb87a1909d Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 30 Jun 2026 11:46:37 +0530 Subject: [PATCH 07/27] Deploy to ASF only in apache/arrow-erlang --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 13088ff..7d48968 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -107,7 +107,7 @@ jobs: asf_site: # Only deploy on a push to main - if: github.ref_name == 'main' && github.event_name == 'push' + if: github.ref_name == 'main' && github.event_name == 'push' && github.repository == 'apache/arrow-erlang' name: Deploy to arrow.apache.org needs: build From a6b745f1f4cd519a2e13ddd76f5254e822af46dc Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 30 Jun 2026 11:49:41 +0530 Subject: [PATCH 08/27] Extract to a clean directory --- .github/workflows/docs.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7d48968..05701c9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -129,14 +129,14 @@ jobs: path: docs - name: Prepare website run: | - tar -xf docs/artifact.tar -C docs - rm docs/artifact.tar - cp .asf.yaml ./docs/.asf.yaml + tar -xf docs/artifact.tar -C asf-site + rm asf-site/artifact.tar + cp .asf.yaml ./asf-site/.asf.yaml - name: Deploy to ASF uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs + publish_dir: asf-site publish_branch: asf-site # Avoid accumulating history of in progress API jobs: https://github.com/apache/arrow-rs/issues/5908 force_orphan: true From a3977925a9b7b048d3ba01e8940e5317e7a78752 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 30 Jun 2026 11:53:09 +0530 Subject: [PATCH 09/27] Add explicit build docs permissions --- .github/workflows/docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 05701c9..55e4100 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,6 +30,8 @@ env: jobs: build: name: Build Docs + permissions: + contents: read runs-on: ubuntu-latest steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 From 254aaaaa147ddb4da9111a984ccbf882f47112c4 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 30 Jun 2026 11:58:30 +0530 Subject: [PATCH 10/27] Copy .asf.yaml in build process --- .github/workflows/docs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 55e4100..ee7c969 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -72,6 +72,9 @@ 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@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: @@ -133,7 +136,6 @@ jobs: run: | tar -xf docs/artifact.tar -C asf-site rm asf-site/artifact.tar - cp .asf.yaml ./asf-site/.asf.yaml - name: Deploy to ASF uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 with: From ff065cf351d5dfc0d8ccb5d30fc80ed585bc17b8 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 30 Jun 2026 12:16:46 +0530 Subject: [PATCH 11/27] Allow deploying to GH-Pages on workflow-dispatch --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ee7c969..50bef32 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -82,8 +82,8 @@ jobs: path: 'doc' gh_pages: - # Only deploy on a push to main - if: github.ref_name == 'main' && github.event_name == 'push' + # 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 From bc462d88ff8da52a199e6b610831af06056fe266 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 30 Jun 2026 16:33:06 +0530 Subject: [PATCH 12/27] Trigger on pushes to all branches --- .github/workflows/docs.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 50bef32..9bf74a0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,8 +18,6 @@ name: Docs CI on: push: - branches: - - main pull_request: workflow_dispatch: From 67eebbab4f6cd59aacedec9317e623e35ced4aa2 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Wed, 1 Jul 2026 06:54:18 +0530 Subject: [PATCH 13/27] Simplify website preparation --- .github/workflows/docs.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9bf74a0..979e100 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -130,10 +130,8 @@ jobs: with: name: docs-${{ github.sha }} path: docs - - name: Prepare website - run: | - tar -xf docs/artifact.tar -C asf-site - rm asf-site/artifact.tar + - name: Decompress artifact + run: tar -xf docs/artifact.tar -C asf-site - name: Deploy to ASF uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 with: From a7d76cf11f3b4d3663e7485e0116f33e852f79f4 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Sun, 5 Jul 2026 22:45:23 +0530 Subject: [PATCH 14/27] Deploy to GitHub Pages on fork --- .github/workflows/docs.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 979e100..dec986b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -79,10 +79,12 @@ jobs: name: docs-${{ github.sha }} path: 'doc' - 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 + 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 From 892c5fceeec30eb58cc8cf12ecf41ffa1cbb15a0 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Sun, 5 Jul 2026 23:06:52 +0530 Subject: [PATCH 15/27] Setup PR Comment Workflow --- .github/workflows/pr_comment.yml | 53 ++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 35 +++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 .github/workflows/pr_comment.yml diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml new file mode 100644 index 0000000..a9a8690 --- /dev/null +++ b/.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: + pull_request_target: + types: + - opened + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + preview-url: + name: Preview URL + 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} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fa686e7..f1afabd 100644 --- a/CONTRIBUTING.md +++ b/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 +to `doc/` locally by running the following: + + +```shell +rebar3 ex_doc +``` + From 4b7dab4be8d8cc4c821051551ce96545c4c25489 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Sun, 5 Jul 2026 23:27:03 +0530 Subject: [PATCH 16/27] Fix committed merge conflict --- .github/workflows/erlang-ci.yml | 46 --------------------------------- 1 file changed, 46 deletions(-) diff --git a/.github/workflows/erlang-ci.yml b/.github/workflows/erlang-ci.yml index bdfe9d6..3e04496 100644 --- a/.github/workflows/erlang-ci.yml +++ b/.github/workflows/erlang-ci.yml @@ -131,49 +131,3 @@ jobs: - name: Run dialyzer run: rebar3 dialyzer -<<<<<<< HEAD - - docbuild_test: - name: Test Generate the Docs - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: false - - - name: Cache Rust crates - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - key: test-native-${{ runner.os }}-${{ env.RUST_TOOLCHAIN_VERSION }}-${{ hashFiles('native/**/Cargo.lock') }} - restore-keys: | - test-native-${{ runner.os }}-${{ env.RUST_TOOLCHAIN_VERSION }} - - - name: Install Rust - uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable - with: - toolchain: "${{ env.RUST_TOOLCHAIN_VERSION }}" - - - name: Install Erlang/OTP - uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0 - with: - otp-version: 25.1.0 - rebar3-version: '3.18.0' - - - name: Cache Hex packages - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - path: ~/.cache/rebar3/hex/hexpm/packages - key: ${{ runner.os }}-hex-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.lock')) }} - restore-keys: | - ${{ runner.os }}-hex- - - - name: Generate Docs - run: rebar3 ex_doc -======= ->>>>>>> 3f77acb (Publish docs to arrow.apache.org) From b88bf748422eb9fc9f6d5c074a9dd3ec53430862 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Mon, 6 Jul 2026 18:45:43 +0530 Subject: [PATCH 17/27] Pin deploy pages --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index dec986b..15b5abe 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -105,7 +105,7 @@ jobs: runs-on: ubuntu-latest steps: - id: deployment - uses: actions/deploy-pages@v5 + uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 with: artifact_name: docs-${{ github.sha }} From 9445637ccb2153893f58032ec00c6d39140ac92d Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 7 Jul 2026 08:09:30 +0530 Subject: [PATCH 18/27] Fix zizmor lints --- .github/workflows/docs.yml | 4 ++-- .github/workflows/pr_comment.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 15b5abe..b79d91e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -126,9 +126,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Download artifact - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: docs-${{ github.sha }} path: docs diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml index a9a8690..b51aa05 100644 --- a/.github/workflows/pr_comment.yml +++ b/.github/workflows/pr_comment.yml @@ -17,6 +17,7 @@ name: PR comment +# zizmor: ignore[dangerous-triggers] on: pull_request_target: types: From 8622fa04a589cab466c24720e547ee7dc8a05d06 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 7 Jul 2026 08:14:29 +0530 Subject: [PATCH 19/27] Fix zizmor lints again --- .github/workflows/docs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b79d91e..5299e1d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -127,6 +127,9 @@ jobs: 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: From cca73330d9b3e0a8f7c8568296ccd58ee7caa13f Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 7 Jul 2026 08:16:00 +0530 Subject: [PATCH 20/27] Ignore dangerous triggers --- .github/workflows/pr_comment.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml index b51aa05..ede814a 100644 --- a/.github/workflows/pr_comment.yml +++ b/.github/workflows/pr_comment.yml @@ -17,8 +17,7 @@ name: PR comment -# zizmor: ignore[dangerous-triggers] -on: +on: # zizmor: ignore[dangerous-triggers] pull_request_target: types: - opened From f21fd825f66d8fedf2299a05feeeb998e4316c74 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 7 Jul 2026 11:47:38 +0530 Subject: [PATCH 21/27] Deploy main to ASF site --- .github/workflows/docs.yml | 10 +++++----- .htaccess | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 .htaccess diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5299e1d..9753b5d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -70,9 +70,6 @@ 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@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: @@ -135,8 +132,11 @@ jobs: with: name: docs-${{ github.sha }} path: docs - - name: Decompress artifact - run: tar -xf docs/artifact.tar -C asf-site + - name: Prepare website + run: | + tar -xf docs/artifact.tar -C asf-site/main + cp .asf.yaml asf-site + cp .htaccess asf-site - name: Deploy to ASF uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 with: diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..789b674 --- /dev/null +++ b/.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 From 1719edb315a1e2e85b597edf0818b7e27ccb681a Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 7 Jul 2026 12:22:23 +0530 Subject: [PATCH 22/27] Tighten RedirectMatch --- .htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 789b674..1d6c0ae 100644 --- a/.htaccess +++ b/.htaccess @@ -17,4 +17,4 @@ ErrorDocument 404 /erlang/main/404.html -RedirectMatch permanent ^/erlang/(?!main)(.*)$ https://arrow.hexdocs.pm/$1 +RedirectMatch permanent ^/erlang/(?!main/)(.*)$ https://arrow.hexdocs.pm/$1 From 0a43f08286a30018b077e08c34fc80c7f13c23bc Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 7 Jul 2026 12:27:26 +0530 Subject: [PATCH 23/27] Make directory before decompressing tarball --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9753b5d..8f8d8f7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -134,6 +134,7 @@ jobs: path: docs - name: Prepare website run: | + mkdir -p asf-site/main tar -xf docs/artifact.tar -C asf-site/main cp .asf.yaml asf-site cp .htaccess asf-site From 077cebe9860577e350cd0cf5a50855ff066afb0b Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 7 Jul 2026 12:29:09 +0530 Subject: [PATCH 24/27] Fix link in CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1afabd..99c2fc6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -147,7 +147,7 @@ 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 +FYI: You can also generate the site for https://arrow.apache.org/erlang/main to `doc/` locally by running the following: From b491e7b16a0460d0df78c7119e5597d6a3cf3ad6 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 7 Jul 2026 12:31:20 +0530 Subject: [PATCH 25/27] Do not comment on PRs based at apache/arrow-erlang --- .github/workflows/pr_comment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml index ede814a..204f0b6 100644 --- a/.github/workflows/pr_comment.yml +++ b/.github/workflows/pr_comment.yml @@ -30,6 +30,7 @@ permissions: 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 From fe9a5cd465134544547900d31e15703195e66ad7 Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 7 Jul 2026 12:49:19 +0530 Subject: [PATCH 26/27] Check head repo not base repo --- .github/workflows/pr_comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml index 204f0b6..41403a5 100644 --- a/.github/workflows/pr_comment.yml +++ b/.github/workflows/pr_comment.yml @@ -30,7 +30,7 @@ permissions: jobs: preview-url: name: Preview URL - if: github.event.pull_request.base.repo.full_name != 'apache/arrow-erlang' + if: github.event.pull_request.head.repo.full_name != 'apache/arrow-erlang' runs-on: ubuntu-latest steps: - name: Comment From ebbcb5377013355b4cbee0e4984ab338fb31e4cf Mon Sep 17 00:00:00 2001 From: Benjamin Philip Date: Tue, 7 Jul 2026 12:51:02 +0530 Subject: [PATCH 27/27] Tighten redirects --- .htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 1d6c0ae..08bc1b5 100644 --- a/.htaccess +++ b/.htaccess @@ -17,4 +17,4 @@ ErrorDocument 404 /erlang/main/404.html -RedirectMatch permanent ^/erlang/(?!main/)(.*)$ https://arrow.hexdocs.pm/$1 +RedirectMatch permanent ^/erlang/(?!main/?)(.*)$ https://arrow.hexdocs.pm/$1