Some checks failed
Deploy to VPS / deploy (push) Failing after 38s
Replaces GitHub Actions — uses self-hosted vps-runner with node:22. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
33 lines
765 B
YAML
33 lines
765 B
YAML
name: Deploy to VPS
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build site
|
|
run: npm run build
|
|
|
|
- name: Setup SSH key
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.VPS_SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
|
|
chmod 600 ~/.ssh/deploy_key
|
|
ssh-keyscan -H "${{ secrets.VPS_HOST }}" >> ~/.ssh/known_hosts
|
|
|
|
- name: Deploy via rsync
|
|
run: |
|
|
rsync -avz --delete \
|
|
-e "ssh -i ~/.ssh/deploy_key" \
|
|
./dist/ \
|
|
${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }}:/opt/stacks/carlospalanca/html/
|