60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
name: Deploy Web
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "apps/web/**"
|
|
- "packages/shared-types/**"
|
|
- "packages/ui/**"
|
|
- ".github/workflows/deploy-web.yml"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: deploy-web-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Web
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9.15.2
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build workspace
|
|
run: pnpm run build
|
|
|
|
deploy:
|
|
name: Deploy Web (Template)
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
|
|
steps:
|
|
- name: Trigger deployment webhook
|
|
env:
|
|
WEB_DEPLOY_WEBHOOK_URL: ${{ secrets.WEB_DEPLOY_WEBHOOK_URL }}
|
|
run: |
|
|
if [ -z "$WEB_DEPLOY_WEBHOOK_URL" ]; then
|
|
echo "WEB_DEPLOY_WEBHOOK_URL is not configured. Skipping deploy."
|
|
exit 0
|
|
fi
|
|
|
|
curl -X POST "$WEB_DEPLOY_WEBHOOK_URL"
|
|
echo "Web deployment webhook triggered."
|