From 96d4b5c0888f2170b69556338735bf9b516874da Mon Sep 17 00:00:00 2001 From: Eric Schneider <37347760+eric-schneider@users.noreply.github.com> Date: Thu, 19 Nov 2026 10:04:06 -0600 Subject: [PATCH] Use the Docs GitHub App's token, not a PAT GitHub blocks every personal access token in the riptano and datastax organizations from 19 November 2026, 4 PM Pacific. The draft trigger and the UI bundle release sign in with DOCS_GITHUB_PAT, one of those tokens. Get a short-lived token for the draft trigger from the Docs GitHub App instead, with actions/create-github-app-token. It is limited to GitHub Actions in riptano/datastax-docs-site, where it starts the draft build and follows it. The App's client ID and private key come from organization variables and secrets: DOCS_APP_RIPTANO_CLIENT_ID and DOCS_APP_RIPTANO_PRIVATE_KEY where each organization has its own App, otherwise DOCS_APP_CLIENT_ID and DOCS_APP_PRIVATE_KEY. The release no longer stores a token: nothing it runs needs one, since npm ci installs only from the npm registry and the release uses GitHub's built-in token. --- .github/workflows/dispatch-deploy-draft.yml | 14 +++++++++++++- .github/workflows/release-ui-bundle.yml | 5 ----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dispatch-deploy-draft.yml b/.github/workflows/dispatch-deploy-draft.yml index 6bb72a49..0dcf338d 100644 --- a/.github/workflows/dispatch-deploy-draft.yml +++ b/.github/workflows/dispatch-deploy-draft.yml @@ -10,11 +10,23 @@ jobs: runs-on: ubuntu-latest steps: + - name: Get GitHub App Token + id: app_token + uses: actions/create-github-app-token@v3.3.0 + with: + # The Docs GitHub App: one App for both organizations (DOCS_APP_*), + # or one per organization (DOCS_APP_RIPTANO_* for riptano's). + client-id: ${{ vars.DOCS_APP_RIPTANO_CLIENT_ID || vars.DOCS_APP_CLIENT_ID }} + private-key: ${{ secrets.DOCS_APP_RIPTANO_PRIVATE_KEY || secrets.DOCS_APP_PRIVATE_KEY }} + owner: riptano + repositories: datastax-docs-site + permission-actions: write + - name: Dispatch Antora Build and Deploy uses: convictional/trigger-workflow-and-wait@v1.6.5 with: owner: riptano repo: datastax-docs-site - github_token: ${{ secrets.DOCS_GITHUB_PAT }} + github_token: ${{ steps.app_token.outputs.token }} workflow_file_name: deploy-draft.yml client_payload: '{ "build_repository": "${{ github.event.repository.full_name }}", "build_branch": "main", "draft_branch": "${{ github.event.pull_request.head.ref }}", "pull_request_number": "${{ github.event.pull_request.number }}", "ui_bundle_repository": "${{ github.event.repository.full_name }}", "ui_bundle_branch": "${{ github.event.pull_request.head.ref }}" }' diff --git a/.github/workflows/release-ui-bundle.yml b/.github/workflows/release-ui-bundle.yml index 25d08e4a..f08e52e9 100644 --- a/.github/workflows/release-ui-bundle.yml +++ b/.github/workflows/release-ui-bundle.yml @@ -13,11 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Configure Git Credentials - uses: de-vri-es/setup-git-credentials@v2 - with: - credentials: https://${{ secrets.DOCS_GITHUB_PAT }}@github.com - - name: Checkout Repository uses: actions/checkout@v6 with: