-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1016 Bytes
/
deploy.yml
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
34
35
36
37
38
39
name: Deploy
on:
push:
branches: [ "main" ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Load SSH key
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/huron.key
chmod 600 ~/.ssh/huron.key
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
- name: Install ansible
run: pip install ansible==9.6.0
- name: Run ansible
run: cd ansible/ && ansible-playbook playbook.yaml --start-at-task="clone"
env:
ANSIBLE_HOST_KEY_CHECKING: False
ANSIBLE_PRIVATE_KEY_FILE: "~/.ssh/huron.key"
ANSIBLE_HOST: ${{ vars.ANSIBLE_HOST }}
ANSIBLE_USER: ${{ vars.ANSIBLE_USER }}
DEBUG: ${{ vars.DEBUG }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
CENTRALNIC_USERNAME: ${{ secrets.CENTRALNIC_USERNAME }}
CENTRALNIC_PASSWORD: ${{ secrets.CENTRALNIC_PASSWORD }}