-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1.07 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Deploy with Ansible
on:
workflow_dispatch:
inputs:
hosting_branch:
description: The branch to pull for the hosting repository
required: false
default: main
frontend_branch:
description: The branch to pull for the frontend repository
required: false
default: main
backend_branch:
description: The branch to pull for the backend repository
required: false
default: main
repository_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ansible
run: pip3 install ansible
- name: Deploy with Ansible
run: ansible-playbook -i "root@$SERVER_HOSTNAME", playbooks/deploy.yaml
env:
SERVER_HOSTNAME: ${{ secrets.SERVER_HOSTNAME }}
SERVER_PASSWORD: ${{ secrets.SERVER_PASSWORD }}
ANSIBLE_HOST_KEY_CHECKING: False
FRONTEND_BRANCH: ${{ inputs.frontend_branch }}
BACKEND_BRANCH: ${{ inputs.backend_branch }}
HOSTING_BRANCH: ${{ inputs.hosting_branch }}