]> khamidou — GitHub mirrors - safetensors.git/commitdiff
[doc build] Use secrets (#270)
authorMishig <dmishig@gmail.com>
Fri, 9 Jun 2023 10:59:02 +0000 (12:59 +0200)
committerGitHub <noreply@github.com>
Fri, 9 Jun 2023 10:59:02 +0000 (12:59 +0200)
.github/workflows/build_documentation.yml
.github/workflows/delete_doc_comment.yml
.github/workflows/delete_doc_comment_trigger.yml [new file with mode: 0644]
.github/workflows/upload_pr_documentation.yml [new file with mode: 0644]

index 8d19726576740e817ab27521ae0263cfaede22dc..1e57791077056c9483a70e2170a93bb1e834ddad 100644 (file)
@@ -19,3 +19,4 @@ jobs:
       install_rust: true
     secrets:
       token: ${{ secrets.HUGGINGFACE_PUSH }}
+      hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
index 9d705e21a9d9df03f4166c438051dc013e3d2c9b..72801c856eb5155ccf321d63be37bd146aff260d 100644 (file)
@@ -1,12 +1,13 @@
-name: Delete dev documentation
+name: Delete doc comment
 
 on:
-  pull_request:
-    types: [ closed ]
+  workflow_run:
+    workflows: ["Delete doc comment trigger"]
+    types:
+      - completed
 
 jobs:
   delete:
     uses: huggingface/doc-builder/.github/workflows/delete_doc_comment.yml@main
-    with:
-      pr_number: ${{ github.event.number }}
-      package: safetensors
\ No newline at end of file
+    secrets:
+      comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/delete_doc_comment_trigger.yml b/.github/workflows/delete_doc_comment_trigger.yml
new file mode 100644 (file)
index 0000000..57415f3
--- /dev/null
@@ -0,0 +1,11 @@
+name: Delete doc comment trigger
+
+on:
+  pull_request:
+    types: [ closed ]
+
+jobs:
+  delete:
+    uses: huggingface/doc-builder/.github/workflows/delete_doc_comment_trigger.yml@main
+    with:
+      pr_number: ${{ github.event.number }}
\ No newline at end of file
diff --git a/.github/workflows/upload_pr_documentation.yml b/.github/workflows/upload_pr_documentation.yml
new file mode 100644 (file)
index 0000000..3beea61
--- /dev/null
@@ -0,0 +1,16 @@
+name: Upload PR Documentation
+
+on:
+  workflow_run:
+    workflows: ["Build PR Documentation"]
+    types:
+      - completed
+
+jobs:
+  build:
+    uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main
+    with:
+      package_name: safetensors
+    secrets:
+      hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
+      comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }}
\ No newline at end of file