Skip to content

Repository files navigation

Simplificator Deploy Action

This action allows to you deploy any kind of compose definition to a server. The action connects to the server using SSH, initialized Docker Swarm, deploys your compose definition and cleans up unused images and containers afterward.

Usage

Below you can find an example workflow on how to deploy your application using our deployment action. We assume that a connection to your server is possible with an SSH key. Password authentication is not supported.

name: Deploy to productionon:
workflow_dispatch:
jobs:
deploy:
runs-on: "ubuntu-latest"permissions:
deployments: writesteps:
- name: Checkout codeuses: actions/checkout@v4
- name: Login to Docker Hubuses: docker/login-action@v3with:
username: ${{ secrets.REGISTRY_USERNAME }}password: ${{ secrets.REGISTRY_TOKEN }}
- name: Install SSH keyuses: shimataro/ssh-key-action@v2with:
key: ${{ secrets.DEPLOY_SSH_KEY }}known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Deploy to productionuses: simplificator/deploy-action@mainwith:
compose-file: docker-compose.ymlenvironment: productionenvironment-url: https://example.comstack-name: my-appssh-user-at-host: deployer@123.124.125.126secrets: | - name: secret value: ${{ secrets.SECRET }}

Inputs

NameDescription
compose-filePath to your docker compose definition inside the repository.
environmentThe name of the environment for the deployment (optional). Used to create a GitHub deployment.
environment-urlA URL to access your deployment (optional). Used to create a GitHub deployment.
secretsAllows to define a YAML array of Docker secrets which should be created (optional). You need to define it as a multiline YAML string, as this is technically not supported by Actions directly.
stack-nameName of the Docker Stack that shoud be created on your server.
ssh-user-at-hostUser@host to connect to (e.g. hello@myhost.com)
ssh-portSSH port to connect to. Defaults to 22 if not defined.

License

MIT / BSD

About

An action to deploy your applications using Docker Swarm.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages