From ef57e4b1da76a8324c2a8664f7b2b74f7806c155 Mon Sep 17 00:00:00 2001 From: Chukwuemeka Ajima Date: Wed, 8 May 2024 15:52:34 +0200 Subject: [PATCH] chore(actions): update github actions - update github actions workflow for deploying docs --- .github/workflows/docs.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 330f1d279..d5f50fbeb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,15 +3,25 @@ on: [push] permissions: contents: write + deployments: write jobs: build-and-deploy: + concurrency: ci-${{ github.ref }} runs-on: ubuntu-latest steps: + # Get GitHub token via the CT SDKs App + - name: Generate GitHub token (via CT SDKs App) + id: generate_github_token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.CT_SDKS_APP_ID }} + private-key: ${{ secrets.CT_SDKS_APP_PEM }} + - name: Checkout 🛎️ uses: actions/checkout@v4 - - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. + - name: Install and Build 🔧 run: | yarn install --frozen-lockfile yarn docs @@ -19,4 +29,6 @@ jobs: - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: - folder: docs # The folder the action should deploy. \ No newline at end of file + folder: docs # The folder the action should deploy. + token: ${{ steps.generate_github_token.outputs.token }} + force: false \ No newline at end of file