-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
ActionsGhPagesV4.kt
210 lines (205 loc) · 8.48 KB
/
ActionsGhPagesV4.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
// This file was generated using action-binding-generator. Don't change it by hand, otherwise your
// changes will be overwritten with the next binding code regeneration.
// See https://github.com/typesafegithub/github-workflows-kt for more info.
@file:Suppress(
"DataClassPrivateConstructor",
"UNUSED_PARAMETER",
)
package io.github.typesafegithub.workflows.actions.peaceiris
import io.github.typesafegithub.workflows.domain.actions.Action
import io.github.typesafegithub.workflows.domain.actions.RegularAction
import java.util.LinkedHashMap
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.collections.toList
import kotlin.collections.toTypedArray
/**
* Action: GitHub Pages action
*
* GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily.
* Static-Site-Generators-friendly.
*
* [Action on GitHub](https://github.com/peaceiris/actions-gh-pages)
*
* @param deployKey Set a SSH private key from repository secret value for pushing to the remote
* branch.
* @param githubToken Set a generated GITHUB_TOKEN for pushing to the remote branch.
* @param personalToken Set a personal access token for pushing to the remote branch.
* @param publishBranch Set a target branch for deployment.
* @param publishDir Set an input directory for deployment.
* @param destinationDir Set an destination subdirectory for deployment.
* @param externalRepository Set an external repository (owner/repo).
* @param allowEmptyCommit If empty commits should be made to the publication branch
* @param keepFiles If existing files in the publish branch should be not removed before deploying
* @param forceOrphan Keep only the latest commit on a GitHub Pages branch
* @param userName Set Git user.name
* @param userEmail Set Git user.email
* @param commitMessage Set a custom commit message with a triggered commit hash
* @param fullCommitMessage Set a custom full commit message without a triggered commit hash
* @param tagName Set tag name
* @param tagMessage Set tag message
* @param enableJekyll Enable the GitHub Pages built-in Jekyll
* @param disableNojekyll An alias for enable_jekyll to disable adding .nojekyll file to a
* publishing branch
* @param cname Set custom domain
* @param excludeAssets Set files or directories to exclude from a publish directory.
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
* the binding
* @param _customVersion Allows overriding action's version, for example to use a specific minor
* version, or a newer version that the binding doesn't yet know about
*/
public data class ActionsGhPagesV4 private constructor(
/**
* Set a SSH private key from repository secret value for pushing to the remote branch.
*/
public val deployKey: String? = null,
/**
* Set a generated GITHUB_TOKEN for pushing to the remote branch.
*/
public val githubToken: String? = null,
/**
* Set a personal access token for pushing to the remote branch.
*/
public val personalToken: String? = null,
/**
* Set a target branch for deployment.
*/
public val publishBranch: String? = null,
/**
* Set an input directory for deployment.
*/
public val publishDir: String? = null,
/**
* Set an destination subdirectory for deployment.
*/
public val destinationDir: String? = null,
/**
* Set an external repository (owner/repo).
*/
public val externalRepository: String? = null,
/**
* If empty commits should be made to the publication branch
*/
public val allowEmptyCommit: Boolean? = null,
/**
* If existing files in the publish branch should be not removed before deploying
*/
public val keepFiles: Boolean? = null,
/**
* Keep only the latest commit on a GitHub Pages branch
*/
public val forceOrphan: Boolean? = null,
/**
* Set Git user.name
*/
public val userName: String? = null,
/**
* Set Git user.email
*/
public val userEmail: String? = null,
/**
* Set a custom commit message with a triggered commit hash
*/
public val commitMessage: String? = null,
/**
* Set a custom full commit message without a triggered commit hash
*/
public val fullCommitMessage: String? = null,
/**
* Set tag name
*/
public val tagName: String? = null,
/**
* Set tag message
*/
public val tagMessage: String? = null,
/**
* Enable the GitHub Pages built-in Jekyll
*/
public val enableJekyll: Boolean? = null,
/**
* An alias for enable_jekyll to disable adding .nojekyll file to a publishing branch
*/
public val disableNojekyll: Boolean? = null,
/**
* Set custom domain
*/
public val cname: String? = null,
/**
* Set files or directories to exclude from a publish directory.
*/
public val excludeAssets: List<String>? = null,
/**
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
*/
public val _customInputs: Map<String, String> = mapOf(),
/**
* Allows overriding action's version, for example to use a specific minor version, or a newer
* version that the binding doesn't yet know about
*/
public val _customVersion: String? = null,
) : RegularAction<Action.Outputs>("peaceiris", "actions-gh-pages", _customVersion ?: "v4") {
public constructor(
vararg pleaseUseNamedArguments: Unit,
deployKey: String? = null,
githubToken: String? = null,
personalToken: String? = null,
publishBranch: String? = null,
publishDir: String? = null,
destinationDir: String? = null,
externalRepository: String? = null,
allowEmptyCommit: Boolean? = null,
keepFiles: Boolean? = null,
forceOrphan: Boolean? = null,
userName: String? = null,
userEmail: String? = null,
commitMessage: String? = null,
fullCommitMessage: String? = null,
tagName: String? = null,
tagMessage: String? = null,
enableJekyll: Boolean? = null,
disableNojekyll: Boolean? = null,
cname: String? = null,
excludeAssets: List<String>? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(deployKey=deployKey, githubToken=githubToken, personalToken=personalToken,
publishBranch=publishBranch, publishDir=publishDir, destinationDir=destinationDir,
externalRepository=externalRepository, allowEmptyCommit=allowEmptyCommit,
keepFiles=keepFiles, forceOrphan=forceOrphan, userName=userName, userEmail=userEmail,
commitMessage=commitMessage, fullCommitMessage=fullCommitMessage, tagName=tagName,
tagMessage=tagMessage, enableJekyll=enableJekyll, disableNojekyll=disableNojekyll,
cname=cname, excludeAssets=excludeAssets, _customInputs=_customInputs,
_customVersion=_customVersion)
@Suppress("SpreadOperator")
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
*listOfNotNull(
deployKey?.let { "deploy_key" to it },
githubToken?.let { "github_token" to it },
personalToken?.let { "personal_token" to it },
publishBranch?.let { "publish_branch" to it },
publishDir?.let { "publish_dir" to it },
destinationDir?.let { "destination_dir" to it },
externalRepository?.let { "external_repository" to it },
allowEmptyCommit?.let { "allow_empty_commit" to it.toString() },
keepFiles?.let { "keep_files" to it.toString() },
forceOrphan?.let { "force_orphan" to it.toString() },
userName?.let { "user_name" to it },
userEmail?.let { "user_email" to it },
commitMessage?.let { "commit_message" to it },
fullCommitMessage?.let { "full_commit_message" to it },
tagName?.let { "tag_name" to it },
tagMessage?.let { "tag_message" to it },
enableJekyll?.let { "enable_jekyll" to it.toString() },
disableNojekyll?.let { "disable_nojekyll" to it.toString() },
cname?.let { "cname" to it },
excludeAssets?.let { "exclude_assets" to it.joinToString(",") },
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)
override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId)
}