Simplify deploy workflow: SSH into server and run Ansible locally
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,12 +7,6 @@ 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
|
||||
@@ -21,4 +15,4 @@ jobs:
|
||||
ssh-keyscan 34.90.187.4 >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Deploy
|
||||
run: ansible-playbook -i ansible/hosts.ini ansible/deploy.yml --vault-password-file <(echo "${{ secrets.ANSIBLE_VAULT_PASSWORD }}")
|
||||
run: ssh bot@34.90.187.4 "cd /var/www/e-ticket && ansible-playbook ansible/deploy.yml -i ansible/hosts.ini --vault-password-file <(echo '${{ secrets.ANSIBLE_VAULT_PASSWORD }}')"
|
||||
|
||||
Reference in New Issue
Block a user