Skip to content

Commit 15bbe57

Browse files
committed
add workflow to auto update content
Signed-off-by: rishichawda <[email protected]>
1 parent 2249a15 commit 15bbe57

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Update Content Submodule and Trigger Deployment
2+
3+
on:
4+
repository_dispatch:
5+
types:
6+
- content-update
7+
8+
jobs:
9+
update-content-submodule:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
with:
15+
submodules: true
16+
token: ${{ secrets.CONTENT_UPDATE_PAT }}
17+
persist-credentials: false
18+
19+
- name: Authorize Git
20+
run: |
21+
git config --global user.email "[email protected]"
22+
git config --global user.name "$GITHUB_ACTOR"
23+
24+
- name: Update content submodule
25+
run: |
26+
git submodule update --remote --recursive
27+
git add content
28+
git commit -m "Update content submodule" || echo "No changes to commit"
29+
git push origin main

0 commit comments

Comments
 (0)