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 15:33:36 UTC

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

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



##########
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_ this push is not yet working because that is disallowed by default from pushes (to avoid an infinite loop of actions re-triggering themselves), according to https://stackoverflow.com/a/58393457/653364 (which suggests you need to use a custom personal access token instead of the default one). 
   I can maybe also use a similar approach as in `deploy.yml`

##########
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"

Review comment:
       Ideally would replace the hardcoded date with the `DATE` env variable (although it might need to be the day before "today"). Unless there would be a way to query what is the latest tag from "ursacomputing/crossbow" and extract the date from there.




-- 
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