Merge pull request #66 from TelesCoop/geoserver #35
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: Run deploy prod | |
on: | |
push: | |
branches: | |
- dev | |
# From https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#running-a-workflow-when-a-pull-request-is-approved | |
pull_request: | |
branches: | |
- dev | |
types: | |
- closed | |
jobs: | |
deploy-prod: | |
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Deploy frontend in prod | |
uses: dawidd6/action-ansible-playbook@v2 | |
with: | |
playbook: frontend.yml | |
directory: deploy | |
vault_password: ${{secrets.ANSIBLE_VAULT_KEY}} | |
options: | | |
-l prod | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Deploy backend in prod | |
uses: dawidd6/action-ansible-playbook@v2 | |
with: | |
playbook: backend.yml | |
directory: deploy | |
vault_password: ${{secrets.ANSIBLE_VAULT_KEY}} | |
options: | | |
-l prod | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Deploy static in prod | |
uses: dawidd6/action-ansible-playbook@v2 | |
with: | |
playbook: showcase.yml | |
directory: deploy | |
vault_password: ${{secrets.ANSIBLE_VAULT_KEY}} | |
options: | | |
-l prod | |
key: ${{ secrets.SSH_PRIVATE_KEY }} |