Skip to content

Commit a517394

Browse files
committed
chore: this should be v2.1.0
1 parent 98ca223 commit a517394

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ GitHub action to deploy your application to [Clever Cloud](https://clever-cloud.
1010
## Prerequisite
1111

1212
⚠️ When creating an application on Clever Cloud, you have to choose
13-
between deploying "*from a local repository*" (using Clever CLI, Git
14-
or SFTP) or "*from a Github repository*" (using a webhook setup
13+
between deploying "_from a local repository_" (using Clever CLI, Git
14+
or SFTP) or "_from a Github repository_" (using a webhook setup
1515
automatically by Clever Cloud). Only the first type of applications
1616
can be deployed using this Github action.
1717

1818
In your project's `.clever.json`, if the `deploy_url` value starts
1919
with `https://github.com/`, your application is meant to be deployed
20-
"*from a Github repository*" only.
20+
"_from a Github repository_" only.
2121
If you try deploying it with this Github action, you will get the
2222
following message in your logs: `[ERROR] HTTP Error: 401 Authorization
2323
Required`.
2424

2525
Currently (early 2023), the only workaround is to create a new
26-
application on Clever Cloud, that deploys "*from a local repository*",
26+
application on Clever Cloud, that deploys "_from a local repository_",
2727
then remove the Clever Cloud webhook that has been created on your
2828
Github repository.
2929

@@ -102,8 +102,9 @@ $ cat ~/.config/clever-cloud/clever-tools.json
102102
```
103103

104104
4. In your repository settings, [add the following secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets):
105-
- `CLEVER_TOKEN`: the `token` value in the credentials
106-
- `CLEVER_SECRET`: the `secret` value in the credentials
105+
106+
- `CLEVER_TOKEN`: the `token` value in the credentials
107+
- `CLEVER_SECRET`: the `secret` value in the credentials
107108

108109
## Extra Environment Variables
109110

@@ -121,7 +122,7 @@ key=value).
121122
EGG=spam
122123
# ^-- ..and the indentation here
123124
env:
124-
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
125+
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
125126
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
126127
```
127128

@@ -158,7 +159,7 @@ regardless of the deployment status:
158159
with:
159160
timeout: 1800 # wait at maximum 30 minutes before moving on
160161
env:
161-
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
162+
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
162163
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
163164
```
164165

@@ -180,7 +181,10 @@ Clever Cloud uses a Git remote to perform deploys. By default, if the commit you
180181

181182
## Same Commit Policy
182183

184+
> Support: introduced in v2.1.0
185+
183186
When the local and remote commits are identical, you can control what happens using the `sameCommitPolicy` option. Possible values are:
187+
184188
- `error` (default): Fail the deployment
185189
- `ignore`: Skip the deployment silently
186190
- `restart`: Restart the application without redeploying
@@ -242,6 +246,7 @@ _Note: this behaviour will be disabled if the `quiet` option is used._
242246
This action follows [SemVer](https://semver.org/).
243247

244248
To specify the version of the action to use:
249+
245250
- `uses: 47ng/[email protected]`: latest stable version
246251
- `uses: 47ng/actions-clever-cloud@3e5402496b8d6492401ebb3134acfeccc25c3fce`: pinned to a specific Git SHA-1 (check out the [releases](https://github.com/47ng/actions-clever-cloud/releases))
247252
- `uses: docker://ghcr.io/47ng/actions-clever-cloud:latest`: latest code from master (not recommended, as it may break: hic sunt dracones.)
@@ -275,10 +280,11 @@ Using this action at work ? [Sponsor me](https://github.com/sponsors/franky47) t
275280

276281
## Deploying a Specific Directory
277282

283+
> Support: introduced in v2.1.0
284+
278285
> ⚠️ Important note about the difference between `working-directory` and `deployPath`:
279286
>
280287
> - `working-directory` (GitHub Actions option) : Only changes the directory where the action runs. All files remain available, only the execution context changes.
281-
>
282288
> - `deployPath` (this action's option) : Specifies exactly which files will be sent to Clever Cloud. Allows deploying only a subset of files, like a `dist` or `build` folder.
283289

284290
### Example
@@ -287,15 +293,16 @@ Using this action at work ? [Sponsor me](https://github.com/sponsors/franky47) t
287293
# This will NOT deploy only the build folder:
288294
- uses: 47ng/[email protected]
289295
with:
290-
working-directory: ./build # ❌ Only changes where the action runs
296+
working-directory: ./build # ❌ Only changes where the action runs
291297
292298
# This will deploy only the build folder:
293299
- uses: 47ng/[email protected]
294300
with:
295-
deployPath: ./build # ✅ Only sends these files to Clever Cloud
301+
deployPath: ./build # ✅ Only sends these files to Clever Cloud
296302
```
297303

298304
This option is particularly useful for:
305+
299306
- Monorepos where you want to deploy a single package
300307
- Projects where you only want to deploy built/compiled files
301308
- Filtering which files are sent to Clever Cloud

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ inputs:
5656
If not set, the Clever Cloud CLI default (error) will be used.
5757
runs:
5858
using: docker
59-
image: docker://ghcr.io/47ng/actions-clever-cloud:2.0.1
59+
image: docker://ghcr.io/47ng/actions-clever-cloud:2.1.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@47ng/actions-clever-cloud",
3-
"version": "2.0.1",
3+
"version": "2.1.0",
44
"private": true,
55
"description": "GitHub Action to deploy to Clever Cloud",
66
"license": "MIT",

0 commit comments

Comments
 (0)