Skip to content

Commit

Permalink
Move documentation publish to release, adjust release process
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Oct 12, 2023
1 parent bd32b26 commit 8463b4c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 39 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/docusaurus.yml

This file was deleted.

45 changes: 40 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,31 @@ name: Release
on:
workflow_dispatch:
inputs:
docs_only:
description: Skip package release and publish documentation only
default: false
type: boolean
dry_run:
description: 'Run semantic-release in "dry run" mode'
description: Run package release in "dry run" mode (does not publish)
default: false
type: boolean
docs_env:
description: Pick environment to publish documentation to
required: true
type: choice
default: staging
options:
- production
- staging

env:
NODE_OPTIONS: --max_old_space_size=4096
jobs:
release:
name: Release
name: Release from "${{ github.ref_name }}" branch
runs-on: ubuntu-latest
# GH does not allow to limit branches in the workflow_dispatch settings so this here is a safety measure
if: ${{ github.ref_name == 'master' || github.ref_name == 'rc' || github.ref_name == 'release-v9' }}
if: ${{ inputs.docs_only == 'false' || github.ref_name == 'master' || github.ref_name == 'rc' || github.ref_name == 'release-v9' }}
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -35,3 +47,26 @@ jobs:
run: >
yarn semantic-release
${{ inputs.dry_run && '--dry-run' || '' }}
push_docusaurus:
name: Publish documentation from "${{ github.ref_name }}" branch to ${{ inputs.docs_env }}
runs-on: ubuntu-latest
outputs:
target-version: $${{ steps.target-version.outputs }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts
- name: Merge docs stream-chat-css
run: bash scripts/merge-stream-chat-css-docs.sh node_modules/@stream-io/stream-chat-css/docs
- name: Push to stream-chat-docusaurus
uses: GetStream/push-stream-chat-docusaurus-action@main
with:
target-branch: ${{ inputs.docs_env }}
env:
DOCUSAURUS_GH_TOKEN: ${{ secrets.DOCUSAURUS_GH_TOKEN }}

0 comments on commit 8463b4c

Please sign in to comment.