You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -36,26 +36,32 @@ The inputs are organized in a table for quick [reference](#reference) with addit
36
36
37
37
### name
38
38
39
-
the stack name for Swarm and project name for Compose.
39
+
Swarm sack name or Compose project name.
40
40
41
41
Example: `cool-stack`
42
42
43
43
### file
44
44
45
-
Stack file or Compose file(s). _Swarm_ only supports 1 file per stack.
45
+
Stack file or Compose file(s).
46
+
47
+
_Swarm._ Only supports 1 file per stack.
46
48
47
49
_Compose._[Multiple files](https://docs.docker.com/compose/how-tos/multiple-compose-files/) can be provided, space seperated. and the `-f` flag will be prepended to each file.
Enable Docker Compose mode by setting this to `compose`.
53
57
54
-
**Compose Only.** Set this to `compose` to use [compose up](https://docs.docker.com/reference/cli/docker/compose/up/) instead of [stack deploy](https://docs.docker.com/reference/cli/docker/stack/deploy/) for non-swarm hosts.
58
+
Ths deploy will use [compose up](https://docs.docker.com/reference/cli/docker/compose/up/) instead of [stack deploy](https://docs.docker.com/reference/cli/docker/stack/deploy/) for non-swarm hosts.
55
59
56
-
### args
60
+
Example: `compose`
57
61
58
-
**Compose Only.** Compose arguments to pass to the `compose up` command. Only used for `mode: compose` deployments.
You must provide either a `pass` or `ssh_key`, but **not** both.
95
101
96
102
When using a password, a temporary key is generated using [ssh-keygen](https://linux.die.net/man/1/ssh-copy-id)
97
-
and copied to the host using[ssh-copy-id](https://linux.die.net/man/1/ssh-copy-id).
98
-
The authorized_keys file is [cleaned up](https://github.com/cssnr/stack-deploy-action/blob/master/src/main.sh#L10) after each deploy.
103
+
and copied to the host with[ssh-copy-id](https://linux.die.net/man/1/ssh-copy-id) using [sshpass](https://linux.die.net/man/1/sshpass).
104
+
The authorized_keys file entry is [cleaned up](https://github.com/cssnr/stack-deploy-action/blob/master/src/main.sh#L10) after each deploy.
99
105
100
-
To generate an SSH run the following as the `user` you are using:
106
+
To generate an SSH key, run the following as the `user` you are using:
101
107
102
108
::: code-group
103
109
@@ -121,29 +127,36 @@ This will disable the [ssh-keyscan](https://linux.die.net/man/1/ssh-keyscan) com
121
127
122
128
Variables in this file are exported before running stack deploy.
123
129
If you need compose file templating this can also be done in a previous step.
124
-
If using `mode: compose` you can also add the `compose_arg: --env-file stringArray`.
130
+
131
+
_Compose._ You can also add to the [args](#args) with `--env-file stringArray`.
125
132
126
133
::: tip IMPORTANT
127
134
**This is NOT** the Docker compose [env_file](https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/#use-the-env_file-attribute) directive.
Copy file name to clipboardExpand all lines: docs/guides/features.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,14 @@ Deploy a Docker [stack](https://docs.docker.com/reference/cli/docker/stack/deplo
4
4
using a [remote context](https://docs.docker.com/engine/manage-resources/contexts/). This deploys the stack from the current workspace without copying files.
5
5
6
6
- Deploy to Docker Swarm or Compose.
7
-
- Deploy over SSH using keyfile or password.
7
+
- Deploy over SSH using [keyfile](../docs/inputs.md#pass-ssh-key) or [password](../docs/inputs.md#pass-ssh-key).
8
8
- Deploy from the current working directory.
9
-
- Deploy from a private registry with credentials.
9
+
- Deploy from a private registry with [credentials](../docs/inputs.md#registry-user-registry-pass).
10
10
-[Job Summary](#job-summary) with deployment output, including errors.
11
-
- Supports multiple compose file and stack deployments.
12
-
- Allows setting custom arguments for the deployment command.
11
+
- Supports multiple compose [files](../docs/inputs.md#file) and stack deployments.
12
+
- Allows setting custom [arguments](../docs/inputs.md#args) for the deployment command.
13
+
14
+
See the [Inputs Documentation](../docs/inputs.md) for more options.
13
15
14
16
You can [get started here](get-started.md) or view [workflow examples](examples.md).
Copy file name to clipboardExpand all lines: docs/guides/get-started.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,28 +25,29 @@ _If creating a [new workflow](https://docs.github.com/en/actions/concepts/workfl
25
25
26
26
**Make sure to update the highlighted lines.**
27
27
28
-
The only required inputs are `name`, `host`, `user` and `pass` or `ssh_key`_(not both)_.
28
+
The only required inputs are [name](../docs/inputs.md#name), [host](../docs/inputs.md#host), `user`
29
+
and [pass](../docs/inputs.md#pass-ssh-key) or [ssh_key](../docs/inputs.md#pass-ssh-key)_(not both)_.
29
30
30
-
See the [Inputs Documentation](../docs/inputs.md) for more options and **default** values.
31
+
> See the [Inputs Documentation](../docs/inputs.md) for more options and **default** values.
31
32
32
33
## Usage
33
34
34
35
The stack is deployed from the current actions working directory (no files copied). Therefore, all paths are relative to the actions' directory.
35
36
36
-
If you check out your repository to the root and your compose file is in the `app` directory, set `file` to: `app/docker-compose.yaml`
37
+
If you check out your repository to the root and your compose file is in the `app` directory, set [file](../docs/inputs.md#file) to: `app/docker-compose.yaml`
37
38
38
39
If using the [env_file](https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/#use-the-env_file-attribute) compose directive in your stack file, this file's path would be relative to your `docker-compose.yaml` file.
39
40
40
41
The workflow runs based on the [events](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows) defined in the `on:` parameter.
41
42
If using the `workflow_dispatch` trigger you can [manually run the job](https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manually-run-a-workflow) at any time.
42
43
43
-
There are many more [options](../docs/inputs.md) to customize your deployment.
44
+
> See the [Inputs Documentation](../docs/inputs.md) for more options to customize your deployment.
44
45
45
46
## Secrets
46
47
47
48
You should store your credentials in [GitHub Actions Secrets](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-secrets).
48
49
49
-
The SSH Key should be copied and pasted exactly as it appears in the private key file.
50
+
The [SSH key](../docs/inputs.md#pass-ssh-key) should be copied and pasted exactly as it appears in the private key file.
50
51
51
52
You do not need to add all values as a secret. However, be aware that any inputs not added as a secret,
52
53
will be visible in the [GitHub Actions Logs](https://docs.github.com/en/actions/how-tos/monitor-workflows/use-workflow-run-logs).
@@ -76,11 +77,7 @@ Compose Note: `"${STACK_FILES[@]}"` is an array of `-f docker-compose.yaml` for
76
77
77
78
You can view the full deployment script on GitHub: [src/main.sh](https://github.com/cssnr/stack-deploy-action/blob/master/src/main.sh)
78
79
79
-
See the [Inputs Documentation](../docs/inputs.md) for more options to customize the deployment.
80
-
81
-
::: info FEATURE REQUEST
82
-
If you need more options, please [open a feature request](https://github.com/cssnr/stack-deploy-action/discussions/categories/feature-requests)
83
-
:::
80
+
> See the [Inputs Documentation](../docs/inputs.md) for more options to customize the deployment.
84
81
85
82
## Portainer
86
83
@@ -92,3 +89,7 @@ For this you should use: [cssnr/portainer-stack-deploy-action](https://github.co
92
89
93
90
For more details see the [README.md](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme) on GitHub.
94
91
[Support](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#Support) is also available.
92
+
93
+
::: info FEATURE REQUEST
94
+
If you need more options, please [open a feature request](https://github.com/cssnr/stack-deploy-action/discussions/categories/feature-requests)
0 commit comments