Files
Randify.pro/.github/workflows/deploy.yml
T
emil 515c4a6168 Wave 1: add deps, crypto random utility, i18n helper, privacy fix, CI gates
- fix(deps): add zod and typescript to package.json
- feat(lib): add cryptographically secure random utility with TDD
- feat(lib): add client i18n helper with TDD
- fix(i18n): update privacy policy for crypto accuracy
- ci(deploy): add test and lint gates, fix SSH security
2026-05-13 19:34:42 +03:00

36 lines
817 B
YAML

name: Deploy
on:
push:
branches: [main]
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 lint
- run: npm run test
- run: npm run build
- name: Setup SSH key
run: |
mkdir -p ~/.ssh
printf '%s\n' "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
- name: Deploy via rsync
run: |
rsync -avz --delete \
-e "ssh -i ~/.ssh/deploy_key" \
dist/ \
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:~/www/randify.pro/