From ec89c703361e57da5414e15cbf00c6d2ebc571bf Mon Sep 17 00:00:00 2001 From: CPunch Date: Tue, 4 Oct 2022 12:21:22 -0500 Subject: [PATCH] Deploy ansible playbook automagically --- .github/workflows/deploy.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..2ab3905 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,27 @@ +name: Run Playbook + +on: + push: + tags: + - "v*.*.*" + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Set up Git repository + uses: actions/checkout@v3 + with: + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + submodules: recursive + - name: Run Ansible-Playbook + uses: dawidd6/action-ansible-playbook@v2 + with: + playbook: run.yml + key: ${{ secrets.SSH_PRIVATE_KEY }} + inventory: | + [hosts] + openpunk-vps ansible_host=96.30.199.68 ansible_user=root ansible_connection=ssh + vault_password: ${{ secrets.VAULT_PASSWORD }} + options: | + --extra-vars domain=openpunk.com