ddc71dc7f2
- Rebuilt all 9 Asian language landing pages (zh-CN, zh-TW, ja, ko, th, vi, id, ms, hi) - Switched from dark to light theme per MOBILE_FIRST_STANDARD - Added Landvex Authorization section (VW-style certification flow) - Added full copy: hero, stats, how-it-works, missions, earnings, FAQ, footer - Localized currencies and payment methods per market - Build system: template + JSON translations → static HTML - Validation script ensures no missing translations or placeholder leaks - CI/CD pipeline: GitHub Actions → S3 + CloudFront - Version management: npm version patch/minor/major BREAKING CHANGE: Old placeholder pages replaced with full content
102 lines
2.6 KiB
YAML
102 lines
2.6 KiB
YAML
name: Deploy quiXzoom Asia
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'src/**'
|
|
- 'scripts/**'
|
|
- 'package.json'
|
|
workflow_dispatch:
|
|
inputs:
|
|
environment:
|
|
description: 'Deployment environment'
|
|
required: true
|
|
default: 'staging'
|
|
type: choice
|
|
options:
|
|
- staging
|
|
- production
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci || npm install
|
|
|
|
- name: Validate translations
|
|
run: node scripts/validate.js
|
|
|
|
- name: Build
|
|
run: node scripts/build.js
|
|
env:
|
|
VERSION: ${{ github.ref_name }}-${{ github.sha }}
|
|
GIT_COMMIT: ${{ github.sha }}
|
|
GIT_BRANCH: ${{ github.ref_name }}
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist/
|
|
|
|
deploy-staging:
|
|
needs: build
|
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
runs-on: ubuntu-latest
|
|
environment: staging
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist/
|
|
|
|
- name: Configure AWS credentials
|
|
uses: aws-actions/configure-aws-credentials@v4
|
|
with:
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
aws-region: ap-southeast-1
|
|
|
|
- name: Deploy to staging
|
|
run: node scripts/deploy.js --env=staging
|
|
env:
|
|
CF_DIST_STAGING: ${{ secrets.CF_DIST_STAGING }}
|
|
|
|
deploy-production:
|
|
needs: [build, deploy-staging]
|
|
if: github.ref == 'refs/heads/main' && github.event.inputs.environment == 'production'
|
|
runs-on: ubuntu-latest
|
|
environment: production
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist/
|
|
|
|
- name: Configure AWS credentials
|
|
uses: aws-actions/configure-aws-credentials@v4
|
|
with:
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
aws-region: ap-southeast-1
|
|
|
|
- name: Deploy to production
|
|
run: node scripts/deploy.js --env=production
|
|
env:
|
|
CF_DIST_PRODUCTION: ${{ secrets.CF_DIST_PRODUCTION }}
|