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
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
107
108
108
109
## Extra Environment Variables
109
110
@@ -121,7 +122,7 @@ key=value).
121
122
EGG=spam
122
123
# ^-- ..and the indentation here
123
124
env:
124
-
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
125
+
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
125
126
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
126
127
```
127
128
@@ -158,7 +159,7 @@ regardless of the deployment status:
158
159
with:
159
160
timeout: 1800 # wait at maximum 30 minutes before moving on
160
161
env:
161
-
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
162
+
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
162
163
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
163
164
```
164
165
@@ -178,6 +179,26 @@ Clever Cloud uses a Git remote to perform deploys. By default, if the commit you
178
179
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
179
180
```
180
181
182
+
## Same Commit Policy
183
+
184
+
> Support: introduced in v2.1.0
185
+
186
+
When the local and remote commits are identical, you can control what happens using the `sameCommitPolicy` option. Possible values are:
187
+
188
+
- `error` (default): Fail the deployment
189
+
- `ignore`: Skip the deployment silently
190
+
- `restart`: Restart the application without redeploying
191
+
- `rebuild`: Rebuild and redeploy the application
192
+
193
+
```yml
194
+
- uses: 47ng/actions-clever-cloud@v2.0.0
195
+
with:
196
+
sameCommitPolicy: restart
197
+
env:
198
+
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
199
+
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
200
+
```
201
+
181
202
## Logs
182
203
183
204
> Support: introduced in v1.3.1
@@ -225,6 +246,7 @@ _Note: this behaviour will be disabled if the `quiet` option is used._
225
246
This action follows [SemVer](https://semver.org/).
226
247
227
248
To specify the version of the action to use:
249
+
228
250
- `uses: 47ng/actions-clever-cloud@v2.0.0`: latest stable version
229
251
- `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))
230
252
- `uses: docker://ghcr.io/47ng/actions-clever-cloud:latest`: latest code from master (not recommended, as it may break: hic sunt dracones.)
@@ -258,10 +280,11 @@ Using this action at work ? [Sponsor me](https://github.com/sponsors/franky47) t
258
280
259
281
## Deploying a Specific Directory
260
282
283
+
> Support: introduced in v2.1.0
284
+
261
285
> ⚠️ Important note about the difference between `working-directory` and `deployPath`:
262
286
>
263
287
> - `working-directory` (GitHub Actions option) : Only changes the directory where the action runs. All files remain available, only the execution context changes.
264
-
>
265
288
> - `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.
266
289
267
290
### Example
@@ -270,15 +293,16 @@ Using this action at work ? [Sponsor me](https://github.com/sponsors/franky47) t
270
293
# This will NOT deploy only the build folder:
271
294
- uses: 47ng/actions-clever-cloud@v2.0.0
272
295
with:
273
-
working-directory: ./build # ❌ Only changes where the action runs
296
+
working-directory: ./build # ❌ Only changes where the action runs
274
297
275
298
# This will deploy only the build folder:
276
299
- uses: 47ng/actions-clever-cloud@v2.0.0
277
300
with:
278
-
deployPath: ./build # ✅ Only sends these files to Clever Cloud
301
+
deployPath: ./build # ✅ Only sends these files to Clever Cloud
279
302
```
280
303
281
304
This option is particularly useful for:
305
+
282
306
- Monorepos where you want to deploy a single package
283
307
- Projects where you only want to deploy built/compiled files
0 commit comments