From 21ffe4f693c19ccc65ca3357409b5f494e76b6d3 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 14 Jun 2024 15:50:36 +0200 Subject: [PATCH] chore(docs): fix ci (#8135) # Fixing Fork Previews This PR tries to fix the upload of the docs preview to vercel which was not working due to the not available secret. --- .github/workflows/build.yml | 7 +++++++ .github/workflows/docsusaurus.yml | 23 +++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a8f673c2e..faf6181ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,13 @@ permissions: pull-requests: write jobs: + docs: + uses: ./.github/workflows/docsusaurus.yml + secrets: + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + core: uses: ./.github/workflows/core.yml with: diff --git a/.github/workflows/docsusaurus.yml b/.github/workflows/docsusaurus.yml index ec20843e0..9752b0b67 100644 --- a/.github/workflows/docsusaurus.yml +++ b/.github/workflows/docsusaurus.yml @@ -1,15 +1,22 @@ name: Docs -env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} -on: - pull_request: - push: - branches: - - main +on: + workflow_call: + secrets: + VERCEL_TOKEN: + description: 'Vercel API Token' + required: true + VERCEL_ORG_ID: + description: 'Vercel Org/Team ID' + required: true + VERCEL_PROJECT_ID: + description: 'Vercel Project ID' + required: true jobs: Deploy: runs-on: ubuntu-latest + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} steps: - uses: actions/checkout@v4 - uses: dorny/paths-filter@v3