t3-code-android-nightly/.repos/effect-smol/.github/actions/deploy-website/action.yml
2026-09-07 21:54:44 -07:00

40 lines
1.3 KiB
YAML

name: Deploy website
description: Request API reference publication and deployment from the website repository.
inputs:
channel:
description: API reference channel that was published
required: true
dispatch-token:
description: Token with permission to dispatch workflows in Effect-TS/website
required: true
revision:
description: Full Git commit SHA that was published
required: true
runs:
using: composite
steps:
- name: Request website API reference publication
shell: bash
env:
CHANNEL: ${{ inputs.channel }}
GH_TOKEN: ${{ inputs.dispatch-token }}
REVISION: ${{ inputs.revision }}
run: |
if [[ ! "$CHANNEL" =~ ^v[34]$ || ! "$REVISION" =~ ^[a-f0-9]{40}$ ]]; then
echo "::error::Website deployment requires channel v3 or v4 and a full Git commit SHA"
exit 1
fi
jq -n \
--arg channel "$CHANNEL" \
--arg revision "$REVISION" \
'{
event_type: "publish-api-reference",
client_payload: {
repository: "Effect-TS/effect",
channel: $channel,
revision: $revision
}
}' |
gh api --method POST repos/Effect-TS/website/dispatches --input -