Skip to content

Commit d51a3ac

Browse files
committed
Workflow: Added workflow for triggering doc repo + small tweaks
1 parent 65629ef commit d51a3ac

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

.github/workflows/build-push.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: build preview
22

33
on:
4-
release:
5-
types:
6-
- published
74
pull_request:
85
branches:
96
- "*"

.github/workflows/release-build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build preview on documentation repo upon release publish
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
trigger-documentation-build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Trigger 'Build and deploy' workflow in 'documentation' repo
13+
run: |
14+
curl -L \
15+
-X POST \
16+
-H "Accept: application/vnd.github+json" \
17+
-H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
18+
-H "X-GitHub-Api-Version: 2022-11-28" \
19+
"https://api.github.com/repos/nginx/documentation/dispatches" \
20+
-d "{"event_type": "trigger-preview-build", "client_payload": {"environment": "preview", "hugo_theme_override": ""}}"

.github/workflows/slack-notification.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ name: Slack notification for new theme release
22

33
on:
44
pull_request:
5-
# workflow_run:
6-
# workflows:
7-
# - "documentation preview"
8-
# types: [completed]
5+
# repository_dispatch:
6+
# types: [trigger-slack-notification]
97

108
permissions:
119
contents: read
@@ -52,4 +50,5 @@ jobs:
5250
}]
5351
}
5452
env:
53+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
5554
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)