-
Notifications
You must be signed in to change notification settings - Fork 148
69 lines (60 loc) · 2.27 KB
/
Copy pathdeploy_website.yml
File metadata and controls
69 lines (60 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright(C) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: MIT
#
# Auto-deploy the GAIA website (Astro) to Railway whenever website/ changes on
# main. Path-filtered so unrelated commits don't redeploy the site.
#
# Maintainer setup (one-time):
# Secret RAILWAY_TOKEN — a Railway *project* token for the gaia-agent-hub
# project (Railway → project → Settings → Tokens → Project Token, production
# environment). Scopes the deploy to that project; no account login needed.
#
# Railway variable HUB_CATALOG_URL=https://hub.amd-gaia.ai — REQUIRED. The
# website builds its Agent Hub pages from the live hub catalog and has NO
# bundled fixture fallback (website/src/data/catalog.ts), so the build FAILS
# LOUDLY if this is unset. Set it on the website service in Railway → Variables.
#
# The service is built by Railway from website/railway.json (NIXPACKS:
# `npm install && npm run build`, served by `serve dist`).
#
# This workflow is also dispatched by release_agent_email.yml after a successful
# agent publish, so a newly published agent shows up without a website commit.
name: Deploy Website (Railway)
on:
push:
branches: [main]
paths:
- 'website/**'
- '.github/workflows/deploy_website.yml'
workflow_dispatch:
concurrency:
# One website deploy at a time; a newer push supersedes an in-flight one.
group: deploy-website
cancel-in-progress: true
permissions:
contents: read
jobs:
deploy:
name: Deploy website to Railway
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
- name: Install Railway CLI
run: npm install -g @railway/cli
- name: Assert RAILWAY_TOKEN present
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
run: |
set -euo pipefail
if [ -z "${RAILWAY_TOKEN:-}" ]; then
echo "::error::missing repo secret RAILWAY_TOKEN — a Railway project token for gaia-agent-hub. See .github/workflows/deploy_website.yml header."
exit 1
fi
- name: Deploy
working-directory: website
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
run: railway up --service website --ci