mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-14 22:37:44 +02:00
40 lines
1.3 KiB
YAML
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 -
|