Skip to content

Commit 7c2583f

Browse files
committed
Update Inputs and add Links
1 parent 668dddc commit 7c2583f

File tree

10 files changed

+55
-39
lines changed

10 files changed

+55
-39
lines changed

.vitepress/config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ export default defineConfig({
122122
base: '/guides',
123123
items: [
124124
{ text: 'Get Started', link: '/get-started' },
125-
{ text: 'Examples', link: '/examples' },
126125
{ text: 'Features', link: '/features' },
126+
{ text: 'Examples', link: '/examples' },
127127
//
128128
],
129129
},

docs/docs/inputs.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The inputs are organized in a table for quick [reference](#reference) with addit
44

55
## Reference
66

7-
💡 You can click on each input for more [Details](#details).
7+
💡 You can click on an input for more [Details](#details).
88

99
| Input Name | Default Value | Short Description of the Input Value |
1010
| :-------------------------------------------- | :---------------------------------- | :------------------------------------------------------------ |
@@ -36,26 +36,32 @@ The inputs are organized in a table for quick [reference](#reference) with addit
3636

3737
### name
3838

39-
the stack name for Swarm and project name for Compose.
39+
Swarm sack name or Compose project name.
4040

4141
Example: `cool-stack`
4242

4343
### file
4444

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.
4648

4749
_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.
4850

4951
Example: `web.yaml db.yaml`
5052
Output: `-f web.yaml -f db.yaml`
5153

52-
### mode
54+
### mode <Badge type="warning">Compose Only</Badge> {#mode}
55+
56+
Enable Docker Compose mode by setting this to `compose`.
5357

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.
5559

56-
### args
60+
Example: `compose`
5761

58-
**Compose Only.** Compose arguments to pass to the `compose up` command. Only used for `mode: compose` deployments.
62+
### args <Badge type="warning">Compose Only</Badge> {#args}
63+
64+
Compose arguments to pass to the `compose up` command. Only used for `mode: compose` deployments.
5965
The `detach` flag defaults to false for compose. With no args the default is `--remove-orphans --force-recreate`.
6066
Use an empty string to override. For more details, see the compose
6167
[docs](https://docs.docker.com/reference/cli/docker/compose/up/).
@@ -94,10 +100,10 @@ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
94100
You must provide either a `pass` or `ssh_key`, but **not** both.
95101

96102
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.
99105

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:
101107

102108
::: code-group
103109

@@ -121,29 +127,36 @@ This will disable the [ssh-keyscan](https://linux.die.net/man/1/ssh-keyscan) com
121127

122128
Variables in this file are exported before running stack deploy.
123129
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`.
125132

126133
::: tip IMPORTANT
127134
**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.
128135
That is set in your compose file as normal.
129136
:::
130137

131-
### detach
138+
### detach <Badge type="warning">Swarm Only</Badge> {#detach}
132139

133-
**Swarm Only.** Set this to `false` to not exit immediately and wait for the services to converge.
140+
Set this to `false` to not exit immediately and wait for the services to converge.
134141
This will generate extra output in the logs and is useful for debugging deployments.
135142

136143
Defaults to `false` in `mode: compose`.
137144

138-
### resolve_image
145+
See the [stack deploy Options](https://docs.docker.com/reference/cli/docker/stack/deploy/#options) for more details.
146+
147+
### resolve_image <Badge type="warning">Swarm Only</Badge> {#resolve-image}
148+
149+
When the default `always` is used, this argument is omitted.
150+
151+
See the [stack deploy Options](https://docs.docker.com/reference/cli/docker/stack/deploy/#options) for more details.
139152

140-
**Swarm Only.** When the default `always` is used, this argument is omitted.
153+
### registry_auth <Badge type="warning">Swarm Only</Badge> {#registry-auth}
141154

142-
### registry_auth
155+
Set to `true` to deploy with `--with-registry-auth`.
143156

144-
**Swarm Only.** Set to `true` to deploy with `--with-registry-auth`.
157+
If setting [registry_user](#registry-user-registry-pass)/[registry_pass](#registry-user-registry-pass) this is implied.
145158

146-
If setting `registry_user`/`registry_pass` this is implied.
159+
See the [stack deploy Options](https://docs.docker.com/reference/cli/docker/stack/deploy/#options) for more details.
147160

148161
### registry_host
149162

docs/guides/features.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ Deploy a Docker [stack](https://docs.docker.com/reference/cli/docker/stack/deplo
44
using a [remote context](https://docs.docker.com/engine/manage-resources/contexts/). This deploys the stack from the current workspace without copying files.
55

66
- 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).
88
- 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).
1010
- [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.
1315

1416
You can [get started here](get-started.md) or view [workflow examples](examples.md).
1517

docs/guides/get-started.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,29 @@ _If creating a [new workflow](https://docs.github.com/en/actions/concepts/workfl
2525

2626
**Make sure to update the highlighted lines.**
2727

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)_.
2930

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.
3132
3233
## Usage
3334

3435
The stack is deployed from the current actions working directory (no files copied). Therefore, all paths are relative to the actions' directory.
3536

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`
3738

3839
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.
3940

4041
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.
4142
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.
4243

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.
4445
4546
## Secrets
4647

4748
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).
4849

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.
5051

5152
You do not need to add all values as a secret. However, be aware that any inputs not added as a secret,
5253
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
7677

7778
You can view the full deployment script on GitHub: [src/main.sh](https://github.com/cssnr/stack-deploy-action/blob/master/src/main.sh)
7879

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.
8481
8582
## Portainer
8683

@@ -92,3 +89,7 @@ For this you should use: [cssnr/portainer-stack-deploy-action](https://github.co
9289

9390
For more details see the [README.md](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme) on GitHub.
9491
[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)
95+
:::

docs/snippets/examples/compose/full.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
uses: cssnr/stack-deploy-action@v1
33
with:
44
name: "stack-name"
5-
file: "docker-compose-swarm.yaml"
5+
file: "docker-compose.yaml"
66
host: ${{ secrets.DOCKER_HOST }}
77
port: ${{ secrets.DOCKER_PORT }}
88
user: ${{ secrets.DOCKER_USER }}

docs/snippets/examples/swarm/full.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
uses: cssnr/stack-deploy-action@v1
33
with:
44
name: "stack-name"
5-
file: "docker-compose-swarm.yaml"
5+
file: "docker-compose.yaml"
66
host: ${{ secrets.DOCKER_HOST }}
77
port: ${{ secrets.DOCKER_PORT }}
88
user: ${{ secrets.DOCKER_USER }}

docs/snippets/examples/swarm/options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
uses: cssnr/stack-deploy-action@v1
33
with:
44
name: "stack-name"
5-
file: "docker-compose-swarm.yaml"
5+
file: "docker-compose.yaml"
66
host: ${{ secrets.DOCKER_HOST }}
77
port: ${{ secrets.DOCKER_PORT }}
88
user: ${{ secrets.DOCKER_USER }}

docs/snippets/examples/swarm/registry.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
uses: cssnr/stack-deploy-action@v1
33
with:
44
name: "stack-name"
5-
file: "docker-compose-swarm.yaml"
5+
file: "docker-compose.yaml"
66
host: ${{ secrets.DOCKER_HOST }}
77
port: ${{ secrets.DOCKER_PORT }}
88
user: ${{ secrets.DOCKER_USER }}

docs/snippets/examples/workflows/full.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
uses: cssnr/stack-deploy-action@v1
7070
with:
7171
name: "stack-name"
72-
file: "docker-compose-swarm.yaml"
72+
file: "docker-compose.yaml"
7373
host: ${{ secrets.DOCKER_HOST }}
7474
port: ${{ secrets.DOCKER_PORT }}
7575
user: ${{ secrets.DOCKER_USER }}

docs/snippets/examples/workflows/simple.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: cssnr/stack-deploy-action@v1
1818
with:
1919
name: "stack-name"
20-
file: "docker-compose-swarm.yaml"
20+
file: "docker-compose.yaml"
2121
host: ${{ secrets.DOCKER_HOST }}
2222
port: ${{ secrets.DOCKER_PORT }}
2323
user: ${{ secrets.DOCKER_USER }}

0 commit comments

Comments
 (0)