# Build talk-pro and rsync dist/ to the marketing VPS (talkpro.info). # # Required Gitea repo secret (Settings → Secrets → Actions): # TALKPRO_SSH_PRIVATE_KEY full PEM for ubuntu@talkpro (same as luis-only.pem) # # Host/user/path defaults are in the `env:` block below (edit there if needed). # # Requires a runner with: node 22+, ssh, ssh-keyscan, tar (rsync optional; no sudo needed). name: Deploy to talkpro on: push: branches: - main - master workflow_dispatch: env: TALKPRO_HOST: "13.214.179.69" TALKPRO_USER: ubuntu TALKPRO_REMOTE_ROOT: /home/ubuntu/talkpro jobs: build-and-sync: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "22" cache: npm - name: Check deploy secrets env: TALKPRO_SSH_PRIVATE_KEY: ${{ secrets.TALKPRO_SSH_PRIVATE_KEY }} run: | if [ -z "${TALKPRO_SSH_PRIVATE_KEY}" ]; then echo "ERROR: Missing Gitea secret TALKPRO_SSH_PRIVATE_KEY" echo "Add it under Repository → Settings → Secrets (Actions)." echo "Value: full contents of your ubuntu@talkpro SSH private key (PEM)." exit 1 fi - name: Trust host key run: | mkdir -p ~/.ssh chmod 700 ~/.ssh ssh-keyscan -H "$TALKPRO_HOST" >> ~/.ssh/known_hosts 2>/dev/null || true - name: Build and deploy to talkpro env: TALKPRO_SSH_PRIVATE_KEY: ${{ secrets.TALKPRO_SSH_PRIVATE_KEY }} run: bash scripts/deploy-talkpro.sh