From 50bf9df5f6b3ace34e1f98c143eb760ea88b52db Mon Sep 17 00:00:00 2001 From: Mishig Date: Wed, 7 Jun 2023 22:39:11 +0200 Subject: [PATCH] [doc build] Use secrets (#208) Co-authored-by: coyotte508 --- .github/workflows/delete-doc-comment.yml | 16 ---------------- .github/workflows/documentation.yml | 2 ++ .github/workflows/upload-pr-documentation.yml | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 16 deletions(-) delete mode 100644 .github/workflows/delete-doc-comment.yml create mode 100644 .github/workflows/upload-pr-documentation.yml diff --git a/.github/workflows/delete-doc-comment.yml b/.github/workflows/delete-doc-comment.yml deleted file mode 100644 index 5bd9b4f28..000000000 --- a/.github/workflows/delete-doc-comment.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Delete dev documentation - -on: - pull_request: - paths: - - "README.md" - - "hub/README.md" - - "inference/README.md" - types: [closed] - -jobs: - delete: - uses: huggingface/doc-builder/.github/workflows/delete_doc_comment.yml@main - with: - pr_number: ${{ github.event.number }} - package: huggingface.js diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 2bef8a5ba..de158b384 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -20,3 +20,5 @@ jobs: path_to_docs: huggingface.js/docs additional_args: --not_python_module pre_command: corepack enable && cd huggingface.js && pnpm install && pnpm --filter doc-internal start + secrets: + hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} diff --git a/.github/workflows/upload-pr-documentation.yml b/.github/workflows/upload-pr-documentation.yml new file mode 100644 index 000000000..46b0765ac --- /dev/null +++ b/.github/workflows/upload-pr-documentation.yml @@ -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: huggingface.js + secrets: + hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} + comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} \ No newline at end of file