You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "xxchan (via GitHub)" <gi...@apache.org> on 2023/06/26 23:02:10 UTC

[GitHub] [arrow-rs] xxchan opened a new pull request, #4452: fix docs deployment

xxchan opened a new pull request, #4452:
URL: https://github.com/apache/arrow-rs/pull/4452

   Fixup https://github.com/apache/arrow-rs/pull/4436
   
   Mainly refered to opendal's action https://github.com/apache/incubator-opendal/blob/7ede1bdc0849905a5b140cf984481adca05dc1b3/.github/workflows/docs.yml
   
   Tested on my fork https://github.com/xxchan/arrow-rs/tree/asf-site  (the `asf-site` branch might need to be manually created first). Not 100% sure the url works correctly though.
   
   # Rationale for this change
    
   <!--
   Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
   Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
   -->
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please add the `breaking change` label.
   -->
   


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


[GitHub] [arrow-rs] alamb commented on pull request #4452: fix docs deployment

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #4452:
URL: https://github.com/apache/arrow-rs/pull/4452#issuecomment-1612022415

   Proposed follow on : https://github.com/apache/arrow-rs/pull/4461


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


[GitHub] [arrow-rs] xxchan commented on a diff in pull request #4452: fix docs deployment

Posted by "xxchan (via GitHub)" <gi...@apache.org>.
xxchan commented on code in PR #4452:
URL: https://github.com/apache/arrow-rs/pull/4452#discussion_r1244381986


##########
.github/workflows/docs.yml:
##########
@@ -66,20 +66,32 @@ jobs:
       - name: Upload artifacts
         uses: actions/upload-pages-artifact@v1
         with:
+          name: crate-docs
           path: target/doc
 
   deploy:
     # Only deploy if a push to master
     if: github.ref_name == 'master' && github.event_name == 'push'
     needs: docs
     permissions:
-      pages: write # to deploy to Pages
-      id-token: write # to verify the deployment originates from an appropriate source
-    environment:
-      name: github-pages
-      url: ${{ steps.deployment.outputs.page_url }}
+      contents: write
     runs-on: ubuntu-latest
     steps:
-      - name: Deploy to GitHub Pages
-        id: deployment
-        uses: actions/deploy-pages@v2
+      - uses: actions/checkout@v3
+      - name: Download crate docs
+        uses: actions/download-artifact@v3
+        with:
+          name: crate-docs
+          path: website/build
+      - name: Prepare website
+        run: |
+          tar -xf website/build/artifact.tar -C website/build
+          rm website/build/artifact.tar
+          cp .asf.yaml ./website/build/.asf.yaml
+      - name: Deploy to gh-pages

Review Comment:
   > How did you find out it was an approved action?
   
   I didn't find a definitive list neither, but OpenDAL uses it so it should imply so. 🤣
   
   Also mentioned in the link above
   
   <img width="927" alt="image" src="https://github.com/apache/arrow-rs/assets/37948597/e2a9eb68-417f-4000-97d2-c8d5a109919d">
   



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


[GitHub] [arrow-rs] xxchan commented on a diff in pull request #4452: fix docs deployment

Posted by "xxchan (via GitHub)" <gi...@apache.org>.
xxchan commented on code in PR #4452:
URL: https://github.com/apache/arrow-rs/pull/4452#discussion_r1242899338


##########
.asf.yaml:
##########
@@ -38,4 +38,10 @@ github:
         # require branches to be up-to-date before merging
         strict: true
         # don't require any jobs to pass
-        contexts: []
\ No newline at end of file
+        contexts: []
+
+# publishes the content of the `asf-site` branch to
+# https://arrow.apache.org/rust/

Review Comment:
   There's https://arrow.apache.org/julia/ , so I used /rust



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


[GitHub] [arrow-rs] xxchan commented on a diff in pull request #4452: fix docs deployment

Posted by "xxchan (via GitHub)" <gi...@apache.org>.
xxchan commented on code in PR #4452:
URL: https://github.com/apache/arrow-rs/pull/4452#discussion_r1244244660


##########
.github/workflows/docs.yml:
##########
@@ -66,20 +66,32 @@ jobs:
       - name: Upload artifacts
         uses: actions/upload-pages-artifact@v1
         with:
+          name: crate-docs
           path: target/doc
 
   deploy:
     # Only deploy if a push to master
     if: github.ref_name == 'master' && github.event_name == 'push'
     needs: docs
     permissions:
-      pages: write # to deploy to Pages
-      id-token: write # to verify the deployment originates from an appropriate source
-    environment:
-      name: github-pages
-      url: ${{ steps.deployment.outputs.page_url }}
+      contents: write
     runs-on: ubuntu-latest
     steps:
-      - name: Deploy to GitHub Pages
-        id: deployment
-        uses: actions/deploy-pages@v2
+      - uses: actions/checkout@v3
+      - name: Download crate docs
+        uses: actions/download-artifact@v3
+        with:
+          name: crate-docs
+          path: website/build
+      - name: Prepare website
+        run: |
+          tar -xf website/build/artifact.tar -C website/build
+          rm website/build/artifact.tar
+          cp .asf.yaml ./website/build/.asf.yaml
+      - name: Deploy to gh-pages

Review Comment:
   IIUC ASF projects can only run whitelisted actions and this is an approved action, so it should be fine.
   
   https://issues.apache.org/jira/browse/INFRA-21676?jql=text%20~%20%22peaceiris%2Factions-gh-pages%22



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


[GitHub] [arrow-rs] alamb merged pull request #4452: fix docs deployment

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


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


[GitHub] [arrow-rs] alamb commented on a diff in pull request #4452: fix docs deployment

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #4452:
URL: https://github.com/apache/arrow-rs/pull/4452#discussion_r1244155865


##########
.github/workflows/docs.yml:
##########
@@ -66,20 +66,32 @@ jobs:
       - name: Upload artifacts
         uses: actions/upload-pages-artifact@v1
         with:
+          name: crate-docs
           path: target/doc
 
   deploy:
     # Only deploy if a push to master
     if: github.ref_name == 'master' && github.event_name == 'push'
     needs: docs
     permissions:
-      pages: write # to deploy to Pages
-      id-token: write # to verify the deployment originates from an appropriate source
-    environment:
-      name: github-pages
-      url: ${{ steps.deployment.outputs.page_url }}
+      contents: write
     runs-on: ubuntu-latest
     steps:
-      - name: Deploy to GitHub Pages
-        id: deployment
-        uses: actions/deploy-pages@v2
+      - uses: actions/checkout@v3
+      - name: Download crate docs
+        uses: actions/download-artifact@v3
+        with:
+          name: crate-docs
+          path: website/build
+      - name: Prepare website
+        run: |
+          tar -xf website/build/artifact.tar -C website/build
+          rm website/build/artifact.tar
+          cp .asf.yaml ./website/build/.asf.yaml
+      - name: Deploy to gh-pages

Review Comment:
   I think we try to avoid using third-party github actions, as they can potentially be an attack vector.
   
   I wonder what you think about using `git` directly like this?
   
   https://github.com/apache/arrow-datafusion/blob/1d7cfe2256f6416afbd12b04af5b095b23b78c5d/.github/workflows/docs.yaml#L45-L64



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


[GitHub] [arrow-rs] alamb commented on pull request #4452: fix docs deployment

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #4452:
URL: https://github.com/apache/arrow-rs/pull/4452#issuecomment-1611994540

   BTW it appears to be working well: https://arrow.apache.org/rust/
   
   ![Screenshot 2023-06-28 at 3 33 44 PM](https://github.com/apache/arrow-rs/assets/490673/f7169394-355f-4780-bb0c-81b479206b51)
   
   However, I think the main docs page should probably still point at the crate.io page for the released version. I will make a PR for that


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


[GitHub] [arrow-rs] alamb commented on a diff in pull request #4452: fix docs deployment

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #4452:
URL: https://github.com/apache/arrow-rs/pull/4452#discussion_r1244390159


##########
.github/workflows/docs.yml:
##########
@@ -66,20 +66,32 @@ jobs:
       - name: Upload artifacts
         uses: actions/upload-pages-artifact@v1
         with:
+          name: crate-docs
           path: target/doc
 
   deploy:
     # Only deploy if a push to master
     if: github.ref_name == 'master' && github.event_name == 'push'
     needs: docs
     permissions:
-      pages: write # to deploy to Pages
-      id-token: write # to verify the deployment originates from an appropriate source
-    environment:
-      name: github-pages
-      url: ${{ steps.deployment.outputs.page_url }}
+      contents: write
     runs-on: ubuntu-latest
     steps:
-      - name: Deploy to GitHub Pages
-        id: deployment
-        uses: actions/deploy-pages@v2
+      - uses: actions/checkout@v3
+      - name: Download crate docs
+        uses: actions/download-artifact@v3
+        with:
+          name: crate-docs
+          path: website/build
+      - name: Prepare website
+        run: |
+          tar -xf website/build/artifact.tar -C website/build
+          rm website/build/artifact.tar
+          cp .asf.yaml ./website/build/.asf.yaml
+      - name: Deploy to gh-pages

Review Comment:
   > I didn't find a definitive list neither, but OpenDAL uses it so it should imply so. 🤣
   
   
   
   Makes sense thanks @xxchan 🚀 



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


[GitHub] [arrow-rs] alamb commented on a diff in pull request #4452: fix docs deployment

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #4452:
URL: https://github.com/apache/arrow-rs/pull/4452#discussion_r1244376404


##########
.github/workflows/docs.yml:
##########
@@ -66,20 +66,32 @@ jobs:
       - name: Upload artifacts
         uses: actions/upload-pages-artifact@v1
         with:
+          name: crate-docs
           path: target/doc
 
   deploy:
     # Only deploy if a push to master
     if: github.ref_name == 'master' && github.event_name == 'push'
     needs: docs
     permissions:
-      pages: write # to deploy to Pages
-      id-token: write # to verify the deployment originates from an appropriate source
-    environment:
-      name: github-pages
-      url: ${{ steps.deployment.outputs.page_url }}
+      contents: write
     runs-on: ubuntu-latest
     steps:
-      - name: Deploy to GitHub Pages
-        id: deployment
-        uses: actions/deploy-pages@v2
+      - uses: actions/checkout@v3
+      - name: Download crate docs
+        uses: actions/download-artifact@v3
+        with:
+          name: crate-docs
+          path: website/build
+      - name: Prepare website
+        run: |
+          tar -xf website/build/artifact.tar -C website/build
+          rm website/build/artifact.tar
+          cp .asf.yaml ./website/build/.asf.yaml
+      - name: Deploy to gh-pages

Review Comment:
   > IIUC ASF projects can only run whitelisted actions and 
   
   Yes this is my understanding too
   
   
   > this is an approved action, so it should be fine.
   
   How did you find out it was an approved action? I couldn't seem to find a definitive list 



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


[GitHub] [arrow-rs] xxchan commented on pull request #4452: fix docs deployment

Posted by "xxchan (via GitHub)" <gi...@apache.org>.
xxchan commented on PR #4452:
URL: https://github.com/apache/arrow-rs/pull/4452#issuecomment-1608438936

    @alamb  PTAL


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