From f34b82a320213938d86ef408044ce2b5310a6806 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Wed, 2 Aug 2023 17:41:37 +0200 Subject: [PATCH] Enable pushing docs to production site --- .github/workflows/docusaurus-deploy.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docusaurus-deploy.yml b/.github/workflows/docusaurus-deploy.yml index 512a6236..c9e6d5be 100644 --- a/.github/workflows/docusaurus-deploy.yml +++ b/.github/workflows/docusaurus-deploy.yml @@ -1,9 +1,10 @@ -name: Publish Docusaurus to staging +name: Publish Docusaurus on: push: - branches: - - main + paths: + - 'docusaurus/video/docusaurus/**' + - '.github/workflows/docusaurus-deploy.yml' jobs: push_docusaurus: @@ -13,14 +14,15 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Setup Node 16 + - name: Setup Node 18 uses: actions/setup-node@v3.1.0 with: - node-version: 16 + node-version: 18 - name: push uses: GetStream/push-stream-chat-docusaurus-action@main with: - target-branch: 'staging' + target-branch: ${{ github.ref == 'refs/heads/main' && 'main' || 'staging' }} + cli-target-branch: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }} destination-repository-name: 'stream-video-docusaurus' source-directory: 'docusaurus/video/docusaurus' env: