1+ name : Build and Deploy to Netlify
2+
3+ on :
4+ # Trigger from align-data repository webhook
5+ repository_dispatch :
6+ types : [align-data-update]
7+
8+ # Allow manual trigger with optional inputs
9+ workflow_dispatch :
10+ inputs :
11+ data_branch :
12+ description : ' Branch of align-data to use'
13+ required : false
14+ default : ' main'
15+ deploy_message :
16+ description : ' Deploy message'
17+ required : false
18+ default : ' Manual deployment'
19+
20+ jobs :
21+ build-and-deploy :
22+ runs-on : ubuntu-latest
23+
24+ steps :
25+ - name : Checkout align-browser
26+ uses : actions/checkout@v3
27+
28+ - name : Checkout align-data with LFS
29+ uses : actions/checkout@v3
30+ with :
31+ repository : PaulHax/align-data
32+ path : align-data
33+ ref : ${{ github.event.inputs.data_branch || 'main' }}
34+ lfs : true
35+
36+ - name : Set up Python
37+ uses : actions/setup-python@v4
38+ with :
39+ python-version : ' 3.10'
40+
41+ - name : Install dependencies
42+ run : |
43+ pip install uv
44+ uv pip install --system -e .
45+
46+ - name : Build site
47+ run : |
48+ python align_browser/build.py align-data/align_data/data/evaluation-outputs \
49+ --output-dir align-browser-site --build-only
50+
51+ - name : Deploy to Netlify
52+ uses : netlify/actions/cli@master
53+ with :
54+ args : deploy --dir=align-browser-site --prod --message "${{ github.event.inputs.deploy_message || 'Automated deployment from align-data update' }}"
55+ env :
56+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
57+ NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
58+
59+ - name : Comment deployment URL
60+ if : success()
61+ run : |
62+ echo "✅ Successfully deployed to Netlify"
63+ echo "Deploy message: ${{ github.event.inputs.deploy_message || 'Automated deployment' }}"
0 commit comments