- Makefile: add install_dev, install_prod, migrations, clear_prod, maintenance commands - Playbook: full deploy flow (maintenance, stop, install, start, migrate, clear, caddy, messenger) - Supervisor config for 2 messenger instances - Workflow: SSH key setup with server IP - hosts.ini: use IP instead of domain, sudo without password - README: full documentation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
654 B
YAML
25 lines
654 B
YAML
name: Deploy to production
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs_on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Ansible
|
|
run: apt-get update && apt-get install -y ansible
|
|
|
|
- name: Setup SSH key
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
|
|
chmod 600 ~/.ssh/id_ed25519
|
|
ssh-keyscan 34.90.187.4 >> ~/.ssh/known_hosts
|
|
|
|
- name: Deploy
|
|
run: ansible-playbook -i ansible/hosts.ini ansible/deploy-caddy.yml --vault-password-file <(echo "${{ secrets.ANSIBLE_VAULT_PASSWORD }}")
|