CI deployement #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI deployement | |
on: | |
workflow_run: | |
workflows: | |
- "Build and Push Docker Image CI" | |
types: | |
- completed | |
branches: | |
- main | |
jobs: | |
deployement: | |
if: ${{github.event.workflow_run.conclusion == 'success'}} | |
runs-on: ubuntu-22.04 | |
steps: | |
#checkout your github code using actions/[email protected] | |
- name: Checkout code | |
uses: actions/[email protected] | |
#run ansible playbook to deploy the backend. | |
- name: Run Ansible playbook | |
uses: dawidd6/action-ansible-playbook@v2 | |
with: | |
playbook: playbook.yml | |
key: ${{secrets.SSH_KEY}} | |
directory: ansible | |
inventory: | | |
[all] | |
david.jeannin.takima.cloud | |
vault_password: ${{secrets.VAULT_PWD}} | |
options: | | |
-u centos |