Skip to content

Deploy to Production #4

Deploy to Production

Deploy to Production #4

name: Deploy to Production
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Tailscale
run: |
sudo curl -fsSL https://tailscale.com/install.sh | sh
- name: Authenticate with Tailscale
env:
TAILSCALE_AUTH_KEY: ${{ secrets.TAILSCALE_AUTH_KEY }}
run: |
sudo tailscale up --authkey=$TAILSCALE_AUTH_KEY
- name: Deploy via Tailscale SSH
env:
SERVER_IP: ${{ secrets.SERVER_TAILSCALE_IP }}
run: |
sudo tailscale ssh git@SERVER_IP
cd /var/www/
sudo bash deploy-code/deploy-update.sh branch origin/main
EOF