-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (33 loc) · 987 Bytes
/
redeploy_action.yml
File metadata and controls
39 lines (33 loc) · 987 Bytes
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 Media api to server
on:
workflow_run:
workflows:
- "Make Image and push it to Docker Hub"
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Decrypt ansible.gpg
run: |
gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output ansible ansible.gpg
chmod 400 ansible
env:
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Ansible
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Deploy
run: |
ansible-playbook playbooks/redeploy.yml
env:
USER: ${{ secrets.USER }}
MEDIA_API_DOMAIN: ${{ secrets.MEDIA_API_DOMAIN }}