Skip to content

Commit 1d93dc8

Browse files
Auto-deploy website after data processing completes (#457)
* Initial plan * Add auto-deployment trigger after data processing completes Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com> * Fix production deployment condition to include repository_dispatch events Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com> * Improve production deployment condition for repository_dispatch events Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
1 parent a4f89cb commit 1d93dc8

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/data-processing.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,3 +279,20 @@ jobs:
279279
content/contributor-analysis/
280280
content/publications/citation_chart.webp
281281
retention-days: 1
282+
283+
#====================
284+
# Trigger Deployment
285+
#====================
286+
#========================================
287+
# Trigger the deploy workflow to publish updated data
288+
#========================================
289+
- name: Trigger deployment
290+
if: github.event_name != 'pull_request'
291+
run: |
292+
echo "🚀 Triggering deployment workflow..."
293+
gh api repos/${{ github.repository }}/dispatches \
294+
-f event_type=data-update \
295+
-F client_payload[data_update]=true
296+
echo "✅ Deployment triggered successfully"
297+
env:
298+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/deploy.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: deploy
44
# FORRT Website Deployment
55
# =======================
66
# Purpose: Build and deploy the FORRT Hugo website
7-
# Triggers: Push to master, PRs, or manual dispatch
7+
# Triggers: Push to master, PRs, manual dispatch, or data updates
88
# Target: Production deployment
99

1010
on:
@@ -20,6 +20,8 @@ on:
2020
description: 'PR number to deploy (optional)'
2121
required: false
2222
type: string
23+
repository_dispatch:
24+
types: [data-update]
2325

2426
jobs:
2527
build:
@@ -161,7 +163,7 @@ jobs:
161163
contents: write
162164
needs:
163165
- deploy-test
164-
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' && github.event.repository.fork == false
166+
if: ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' || github.event_name == 'repository_dispatch') && github.event.repository.fork == false
165167
steps:
166168
#========================================
167169
# Download website artifact for production deployment

0 commit comments

Comments
 (0)