Files
proxy-bun/.github/workflows/deploy.yml
T
MythEclipse 17338a7dca feat: IPv6 outbound rotation via curl --interface
- Add IPv6SourcePool for round-robin IP rotation
- fetchViaCurl: Bun.spawn + curl -6 --interface for source binding
- Auto-fallback to regular fetch when IPv6 connection fails
- Response decompression via --compressed flag
- Docker + GHCR build/deploy workflows
- 8 routable IPv6 addresses on VPS
2026-06-19 19:07:46 +07:00

55 lines
1.4 KiB
YAML

name: Deploy to VPS
on:
repository_dispatch:
types: [deploy]
workflow_dispatch:
env:
VPS_HOST: 45.127.35.244
VPS_USER: root
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.VPS_SSH_KEY }}
- name: Add VPS to known_hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ env.VPS_HOST }} >> ~/.ssh/known_hosts
- name: Pull and restart container
run: |
ssh ${{ env.VPS_USER }}@${{ env.VPS_HOST }} << 'EOF'
set -e
echo "=== Logging in to GHCR ==="
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
echo "=== Pulling latest image ==="
docker pull ghcr.io/${{ github.repository }}:latest
echo "=== Stopping old container ==="
cd /opt/edge-proxy
docker compose down || true
echo "=== Starting new container ==="
docker compose up -d
echo "=== Waiting for health check ==="
sleep 5
curl -sf http://localhost:3000/health || echo "Health check failed"
echo "=== Deployment complete ==="
EOF
- name: Verify deployment
run: |
sleep 10
curl -sf https://proxy.asepharyana.my.id/health || echo "External health check failed"