Skip to content

Commit 63ed01c

Browse files
action
add action to trigger website publishing
1 parent 958999a commit 63ed01c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Trigger Target Workflow
2+
3+
on:
4+
push:
5+
# Allows you to run this workflow manually from the Actions tab
6+
workflow_dispatch:
7+
8+
jobs:
9+
trigger:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Trigger Workflow in Another Repository
14+
run: |
15+
repo_owner="LabVIEWCommunityTraining"
16+
repo_name="www"
17+
workflow_file="publish-website-on-gh-pages.yml"
18+
branch="main"
19+
json_data="{\"ref\": \"$branch\"}"
20+
curl -L \
21+
-X POST \
22+
-H "Accept: application/vnd.github+json" \
23+
-H "Authorization: Bearer ${{ secrets.WEBSITE_DELIVERY_TRIGGER }}" \
24+
-H "X-GitHub-Api-Version: 2022-11-28" \
25+
https://api.github.com/repos/$repo_owner/$repo_name/actions/workflows/$workflow_file/dispatches \
26+
-d "$json_data"

0 commit comments

Comments
 (0)