Skip to content

Manual Publish Docs #15

Manual Publish Docs

Manual Publish Docs #15

name: Manual Publish Docs
on:
workflow_dispatch:
inputs:
workspace_path:
description: 'Path to the workspace being released.'
required: true
type: choice
options:
- sdk/highlight-run
- "sdk/@launchdarkly/observability-node"
workflow_call:
inputs:
workspace_path:
description: 'Path to the workspace being released.'
required: true
type: string
permissions:
id-token: write
contents: write
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish-docs:
runs-on: ubuntu-22.04-8core-32gb
steps:
- name: Checkout
uses: actions/checkout@v4
- run: git submodule update --init --recursive
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
- name: Install js dependencies
run: yarn install --mode=skip-build
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: 'Set WORKSPACE_NAME variable'
shell: bash
run: |
WORKSPACE_NAME=$(./scripts/package-name.sh ${{ inputs.workspace_path }})
echo "WORKSPACE_NAME=$WORKSPACE_NAME" >> $GITHUB_ENV
- name: Build docs
run: yarn docs --filter ${{ env.WORKSPACE_NAME }}
- name: Publish Highlight.run as Observability Plugin
if: inputs.workspace_path == 'sdk/highlight-run'
uses: launchdarkly/gh-actions/actions/[email protected]
with:
docs_path: sdk/highlight-run/docs
output_path: packages/@launchdarkly/observability
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish other JS packages
if: inputs.workspace_path != 'sdk/highlight-run'
uses: launchdarkly/gh-actions/actions/[email protected]
with:
docs_path: ${{ inputs.workspace_path }}/docs
output_path: ${{ inputs.workspace_path }}
github_token: ${{ secrets.GITHUB_TOKEN }}