Skip to content

Publish Documentation #23

Publish Documentation

Publish Documentation #23

on:
workflow_dispatch:
inputs:
workspace_path:
description: 'The workspace to publish docs for'
required: true
default: 'packages/shared/common'
type: choice
options:
- packages/shared/common
- packages/shared/sdk-server
- packages/shared/sdk-server-edge
- packages/shared/akamai-edgeworker-sdk
- packages/sdk/cloudflare
- packages/sdk/server-node
- packages/sdk/vercel
- packages/sdk/akamai-base
- packages/sdk/akamai-edgekv
- packages/store/node-server-sdk-redis
- packages/store/node-server-sdk-dynamodb
name: Publish Documentation
jobs:
build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- name: 'Setup Redis'
if: ${{ inputs.workspace_path == 'packages/store/node-server-sdk-redis' }}
run: |
sudo apt-get update
sudo apt-get install redis-server
sudo service redis-server start
- name: 'Setup DynamoDB'
if: ${{ inputs.workspace_path == 'packages/store/node-server-sdk-dynamodb' }}
run: |
sudo docker run -d -p 8000:8000 amazon/dynamodb-local
- name: 'Set WORKSPACE_NAME variable'
run: |
WORKSPACE_NAME=$(./scripts/package-name.sh ${{ inputs.workspace_path }})
echo "WORKSPACE_NAME=$WORKSPACE_NAME" >> $GITHUB_ENV
- id: build
# Build using the same steps from CI.
name: Build and Test
uses: ./actions/ci
with:
workspace_name: ${{ env.WORKSPACE_NAME }}
workspace_path: ${{ inputs.workspace_path }}
- id: publish
name: Publish Documentation
uses: ./actions/publish-docs
with:
workspace_path: ${{ inputs.workspace_path }}