Skip to content

Commit 44e137e

Browse files
mattleibowCopilot
andauthored
Add go-live workflow to publish docs to live branch (#65)
Manual workflow_dispatch that creates a PR from main to live. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 125cbdf commit 44e137e

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/go-live.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Go Live
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
jobs:
11+
go-live:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Create pull request
21+
env:
22+
GH_TOKEN: ${{ github.token }}
23+
run: |
24+
existing=$(gh pr list --base live --head main --state open --json number --jq '.[0].number')
25+
if [ -n "$existing" ]; then
26+
echo "PR #$existing already exists"
27+
else
28+
gh pr create --base live --head main \
29+
--title "Go Live: publish latest API docs" \
30+
--body "Merge \`main\` into \`live\` to publish the latest API documentation."
31+
fi

0 commit comments

Comments
 (0)