Skip to content

Commit 2c46797

Browse files
committed
Update apidocs.yaml workflow to refine triggers and deployment conditions
- Remove id-token:write permission - Add repository and event-based condition for `deploy-pages` step. - Add `pull_request` trigger to `apidocs.yaml` workflow
1 parent 77357a1 commit 2c46797

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/apidocs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
- published
77
# Allow running this workflow manually from the Actions tab
88
workflow_dispatch:
9+
pull_request:
910

1011
jobs:
1112
deploy:
1213

1314
permissions:
1415
pages: write # to deploy to Pages
15-
id-token: write # to verify the deployment originates from an appropriate source
1616

1717
environment:
1818
name: github-pages
@@ -46,4 +46,5 @@ jobs:
4646

4747
- name: Deploy to GitHub Pages
4848
id: deployment
49+
if: ${{ github.repository == 'modelcontextprotocol/kotlin-sdk' && ((github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch') }}
4950
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)