Skip to content

Commit 63eec11

Browse files
committed
Add content sync workflow for automated content deployment
1 parent 4cf0390 commit 63eec11

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/content-sync.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Content Sync
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'Content/**'
9+
10+
jobs:
11+
sync-content:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: '9.0.x'
22+
23+
- name: Build ContentLoader
24+
run: |
25+
dotnet build ContentLoader/ContentLoader.csproj --configuration Release
26+
27+
- name: Upload Content
28+
env:
29+
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.CONTENT_STORAGE_CONNECTION_STRING }}
30+
run: dotnet run --project ContentLoader/ContentLoader.csproj --configuration Release -- Content
31+
32+
- name: Handle Failure
33+
if: failure()
34+
run: |
35+
echo "Content sync failed. Check the build output and Azure Storage connection string."
36+
exit 1

0 commit comments

Comments
 (0)