-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (25 loc) · 1.1 KB
/
release_website.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
name: Release to Production
on:
workflow_call:
workflow_dispatch:
jobs:
ssh-to-digiocean-and-upgrade:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Ansible
run: sudo apt-get update && sudo apt-get install -y ansible
- name: Run ansible playbook installing docker
run: |
cd ansible
mkdir -p .ssh
echo '${{ secrets.DIGITAL_OCEAN_ROOT_SSH }}' > ".ssh/digital-ocean-root"
chmod 600 ".ssh/digital-ocean-root"
ansible-playbook install-upgrade-docker.yaml -i inventory.yaml -e "ansible_user=root" --private-key ".ssh/digital-ocean-root"
- name: Run Ansible Playbook starting container
run: |
cd ansible
mkdir -p .ssh
echo '${{ secrets.DIGITAL_OCEAN_PLAYTECHNIQUE }}' > ".ssh/digital-ocean-playtechnique"
chmod 600 ".ssh/digital-ocean-playtechnique" #to stop the ssh permissions squawking at me
ansible-playbook -vvv website-deployment.yaml -i inventory.yaml -e "ansible_user=playtechnique" --private-key .ssh/digital-ocean-playtechnique