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: