feat: added workflow dispatch so that we can trigger the workflow man… #3
This file contains hidden or 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: "Deploy Elastic stack on test server" | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: "Publish on the test server" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create a remote docker context | |
uses: arwynfr/actions-docker-context@v2 | |
with: | |
docker_host: ${{ secrets.DOCKER_HOST }} | |
context_name: "remote" | |
ssh_cert: ${{ secrets.SSH_CERT }} | |
ssh_key: ${{ secrets.SSH_KEY }} | |
- name: Deploy Elastic and Kibana on created context | |
env: | |
ELASTIC_PASSWORD: ${{ secrets.ELASTIC_PASSWORD }} | |
KIBANA_PASSWORD: ${{ secrets.KIBANA_PASSWORD }} | |
run: | | |
docker --context remote compose up --build -d | |