From 773ba5f816990be978f937534b187758d14b7bed Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 11 Sep 2023 13:51:31 -0500 Subject: [PATCH] Update the `docs` workflow to allow publishing a specific ref (#7278) Related https://github.com/astral-sh/ruff/issues/7276 Our docs publishing action does not allow targetting a specific commit when run manually which means we cannot update the documentation to anything but the latest commit on `main`. This change allows a ref to be provided. --------- Co-authored-by: Dhruv Manilawala --- .github/workflows/docs.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 953d240d40..e25a8f27aa 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -2,6 +2,11 @@ name: mkdocs on: workflow_dispatch: + inputs: + ref: + description: "The commit SHA, tag, or branch to publish. Uses the default branch if not specified." + default: "" + type: string release: types: [published] @@ -13,6 +18,8 @@ jobs: MKDOCS_INSIDERS_SSH_KEY_EXISTS: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY != '' }} steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} - uses: actions/setup-python@v4 - name: "Add SSH key" if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}