You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/15 21:37:17 UTC

[GitHub] [arrow-site] kou commented on a change in pull request #173: ARROW-1299: [Docs] Publish nightly docs build from crossbow

kou commented on a change in pull request #173:
URL: https://github.com/apache/arrow-site/pull/173#discussion_r770048737



##########
File path: .github/workflows/devdocs.yml
##########
@@ -0,0 +1,68 @@
+# 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: Upload dev docs
+
+on:
+  push:
+  pull_request:

Review comment:
       Do we need these events?

##########
File path: .github/workflows/devdocs.yml
##########
@@ -0,0 +1,68 @@
+# 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: Upload dev docs
+
+on:
+  push:
+  pull_request:
+  schedule:
+    - cron:  '0 0 * * *'
+
+jobs:
+  devdocs:
+    name: Fetch and upload dev docs
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          path: main
+
+      - name: Set the date  
+        run: |
+          echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
+
+      - name: Download the crossbow docs artifact
+        uses: ./main/.github/actions/fetch-gh-release-asset
+        with:
+          repo: "ursacomputing/crossbow"
+          version: "tags/nightly-2021-12-14-0-azure-test-ubuntu-default-docs"
+          file: "docs.tar.gz"
+          token: ${{ secrets.GITHUB_TOKEN }}
+
+      - uses: actions/checkout@v2
+        with:
+          ref: asf-site
+          path: asf-site
+
+      - name: Add docs
+        run: |
+          cd asf-site
+          echo "$(git log -1)"
+          git config user.name "$(git log -1 --pretty=format:%an)"
+          git config user.email "$(git log -1 --pretty=format:%ae)"
+          mkdir -p docs/dev
+          tar -xvzf ../docs.tar.gz -C docs/dev --strip-components=1

Review comment:
       Could you replace `docs/dev/c_glib/index.html` with `docs/c_glib/index.html` after `tar -x`?
   We want to use https://github.com/apache/arrow-site/blob/master/_docs/c_glib/index.md for `c_glib/index.html`.
   
   See also: https://github.com/apache/arrow/blob/master/dev/release/post-09-docs.sh#L59

##########
File path: .github/workflows/devdocs.yml
##########
@@ -0,0 +1,68 @@
+# 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: Upload dev docs
+
+on:
+  push:
+  pull_request:
+  schedule:
+    - cron:  '0 0 * * *'
+
+jobs:
+  devdocs:
+    name: Fetch and upload dev docs
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          path: main
+
+      - name: Set the date  
+        run: |
+          echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
+
+      - name: Download the crossbow docs artifact
+        uses: ./main/.github/actions/fetch-gh-release-asset
+        with:
+          repo: "ursacomputing/crossbow"
+          version: "tags/nightly-2021-12-14-0-azure-test-ubuntu-default-docs"
+          file: "docs.tar.gz"
+          token: ${{ secrets.GITHUB_TOKEN }}
+
+      - uses: actions/checkout@v2
+        with:
+          ref: asf-site
+          path: asf-site
+
+      - name: Add docs
+        run: |
+          cd asf-site
+          echo "$(git log -1)"
+          git config user.name "$(git log -1 --pretty=format:%an)"
+          git config user.email "$(git log -1 --pretty=format:%ae)"
+          mkdir -p docs/dev
+          tar -xvzf ../docs.tar.gz -C docs/dev --strip-components=1
+          if [ "$(git status --porcelain)" != "" ]; then
+            # There are changes to the dev docs
+            git add docs/dev --all
+            git commit -m "Updating dev docs (build ${DATE})"
+            echo "git push"
+            git push

Review comment:
       I think that the information is old. It will work.
   
   I have a job that pushes a commit to `gh-pages` for all `push`: https://github.com/ruby/csv/blob/master/.github/workflows/test.yml#L96-L135
   And it works.

##########
File path: .github/workflows/devdocs.yml
##########
@@ -0,0 +1,68 @@
+# 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: Upload dev docs
+
+on:
+  push:
+  pull_request:
+  schedule:
+    - cron:  '0 0 * * *'
+
+jobs:
+  devdocs:
+    name: Fetch and upload dev docs
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          path: main
+
+      - name: Set the date  
+        run: |
+          echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
+
+      - name: Download the crossbow docs artifact
+        uses: ./main/.github/actions/fetch-gh-release-asset
+        with:
+          repo: "ursacomputing/crossbow"
+          version: "tags/nightly-2021-12-14-0-azure-test-ubuntu-default-docs"
+          file: "docs.tar.gz"
+          token: ${{ secrets.GITHUB_TOKEN }}
+
+      - uses: actions/checkout@v2
+        with:
+          ref: asf-site
+          path: asf-site
+
+      - name: Add docs
+        run: |
+          cd asf-site
+          echo "$(git log -1)"
+          git config user.name "$(git log -1 --pretty=format:%an)"
+          git config user.email "$(git log -1 --pretty=format:%ae)"

Review comment:
       We can use the following:
   
   ```bash
               git config user.name "github-actions[bot]"
               git config user.email "github-actions[bot]@users.noreply.github.com"
   ```




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

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