Aimpress_site/.github/workflows/deploy.yml
Vadym Samoilenko 985d21b53d Add TinaCMS Cloud integration (Phase 1)
- Add tina/config.ts with full schema for all site sections
- Convert i18n from TypeScript to nested JSON (content/translations/)
- Update LanguageContext to import JSON with flattenObject utility
- Update dev/build scripts to run tinacms build
- Add sync-blog.mjs support for content/blog/*.md (TinaCMS posts)
- Update CI/CD with Tina env vars, remove blog rsync exclusion
- Add tina/__generated__/ to .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 20:34:35 +00:00

40 lines
1.1 KiB
YAML

name: Deploy to Server
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
env:
TINA_PUBLIC_CLIENT_ID: ${{ secrets.TINA_PUBLIC_CLIENT_ID }}
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
GITHUB_REF_NAME: ${{ github.ref_name }}
- name: Setup SSH
run: |
mkdir -p ~/.ssh
printf '%s\n' "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_deploy
chmod 600 ~/.ssh/id_deploy
ssh-keyscan -p 1220 57.128.160.249 >> ~/.ssh/known_hosts 2>/dev/null
- name: Deploy to server
run: |
rsync -avz --delete \
-e "ssh -p 1220 -i ~/.ssh/id_deploy" \
dist/ ubuntu@57.128.160.249:/opt/00-infrastructure/Website/website/dist/
ssh -p 1220 -i ~/.ssh/id_deploy ubuntu@57.128.160.249 \
"cd /opt/00-infrastructure/Website/website && docker compose restart web"