forked from githubtraining/intro-to-html
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
375 lines (361 loc) · 10.4 KB
/
config.yml
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
title: Introduction to HTML
description: If you are looking for a quick and fun introduction to the exciting world of programming, this course is for you. Learn fundamental HTML skills and build your first webpage in less than an hour.
template:
name: intro-html
repo: intro-to-html-template
description: "A robot powered training repository :robot:"
before:
- type: createIssue
title: Welcome
body: 01-welcome.md
- type: updateBranchProtection
steps:
- title: Turn on GitHub Pages
description: Turn on GitHub Pages in the settings page of the repository.
event: page_build
link: "{{ repoUrl }}/issues/1"
actions:
- type: octokit
method: repos.getPages
owner: "%payload.repository.owner.login%"
repo: "%payload.repository.name%"
action_id: pagesUrl
- type: respond
with: 00-openapr.md
data:
pagesUrl: "%actions.pagesUrl.data.html_url%"
issue: Welcome
- title: Open a pull request
description: Open a pull request.
event: pull_request.opened
link: "{{ repoUrl }}/issues/1"
actions:
- type: gate
left: "%payload.pull_request.head.ref%"
operator: ===
right: add-index
- type: gate
left: "%payload.pull_request.base.ref%"
operator: ===
right: main
- type: closeIssue
issue: Welcome
action_id: prev
required: false
- type: createPullRequestComment
body: 02-html-structure.md
file: index.html
position: 1
data:
welcomeLink: "%actions.prev.data.html_url%"
- title: Build the HTML document structure
description: Follow the instructions to write the base structure of your HTML file
event: pull_request.synchronize
link: "{{ repoUrl }}/pulls"
actions:
- type: getFileContents
filename: index.html
action_id: index_file
- type: htmlContainsTag
html: "%actions.index_file%"
tag: html
action_id: contains_html
required: false
- type: htmlContainsTag
html: "%actions.index_file%"
tag: body
action_id: contains_body
required: false
- type: gate
every: true
gates:
- left: "%actions.contains_html%"
- left: "%actions.contains_body%"
else:
type: createReview
body: 03e-add-html.md
event: REQUEST_CHANGES
- type: createPullRequestComment
body: 03-title-tag.md
file: index.html
position: 2
- title: Add a title tag
description: Add a title tag
event: pull_request.synchronize
link: "{{ repoUrl }}/pulls"
actions:
- type: getFileContents
filename: index.html
action_id: index_file
- type: htmlContainsTag
html: "%actions.index_file%"
tag: head
action_id: contains_head
required: false
- type: htmlContainsTag
html: "%actions.index_file%"
tag: title
action_id: contains_title
required: false
- type: gate
every: true
gates:
- left: "%actions.contains_title%"
- left: "%actions.contains_head%"
else:
type: createReview
event: REQUEST_CHANGES
body: 03e-add-title.md
- type: createReview
event: APPROVE
body: 04-merge-first-pr.md
- title: Merge your first pull request
description: Merge your pull request
event: pull_request.closed
link: "{{ repoUrl }}/pulls"
actions:
- type: gate
left: "%payload.pull_request.merged%"
- type: octokit
method: repos.getPages
owner: "%payload.repository.owner.login%"
repo: "%payload.repository.name%"
action_id: pagesUrl
- type: createIssue
title: Add a header
body: 05-h1-tag.md
data:
pagesUrl: "%actions.pagesUrl.data.html_url%"
action_id: new_issue
- type: respond
with: next.md
data:
issueURL: "%actions.new_issue.data.html_url%"
- title: Change your username to an h1 tag
description: Change your username to an h1 tag
event: pull_request
link: "{{ repoUrl }}/pulls"
actions:
- type: gate
gates:
- left: "%payload.action%"
operator: ===
right: opened
- left: "%payload.action%"
operator: ===
right: synchronize
- type: gate
left: "%payload.pull_request.base.ref%"
operator: ===
right: main
- type: gate
left: "%payload.action%"
operator: "!=="
right: opened
required: false
else:
type: closeIssue
issue: Add a header
required: false
- type: getFileContents
filename: index.html
action_id: index_file
- type: htmlContainsTag
html: "%actions.index_file%"
tag: h1
action_id: contains_h1
required: false
- type: gate
left: "%actions.contains_h1%"
else:
type: createReview
event: REQUEST_CHANGES
body: 05e-troubleshoot-h1.md
- type: createPullRequestComment
body: 06-add-image.md
file: index.html
position: 5
- title: Add an image
description: Add an image
event: pull_request.synchronize
link: "{{ repoUrl }}/pulls"
actions:
- type: getFileContents
filename: index.html
action_id: index_file
- type: htmlContainsTag
html: "%actions.index_file%"
tag: img
attribute: src
action_id: contains_img
- type: gate
left: "%actions.contains_img%"
else:
type: createReview
body: 06e-image.md
event: REQUEST_CHANGES
- type: createReview
body: 07-merge-second-pr.md
event: APPROVE
- title: Merge your second pull request
description: Merge your pull request
event: pull_request.closed
link: "{{ repoUrl }}/pulls"
actions:
- type: gate
left: "%payload.pull_request.merged%"
- type: octokit
method: repos.getPages
owner: "%payload.repository.owner.login%"
repo: "%payload.repository.name%"
action_id: pagesUrl
- type: createIssue
action_id: new_issue
title: Create a list
body: 08-create-list.md
data:
pagesUrl: "%actions.pagesUrl.data.html_url%"
- type: respond
with: next.md
data:
issueURL: "%actions.new_issue.data.html_url%"
- title: Create a list
description: Create a list
event: pull_request
link: "{{ repoUrl }}/pulls"
actions:
- type: gate
gates:
- left: "%payload.action%"
operator: ===
right: opened
- left: "%payload.action%"
operator: ===
right: synchronize
- type: gate
left: "%payload.pull_request.base.ref%"
operator: ===
right: main
- type: gate
left: "%payload.action%"
operator: "!=="
right: opened
required: false
else:
type: closeIssue
issue: Create a list
required: false
- type: getFileContents
filename: index.html
action_id: index_file
- type: htmlContainsTag
html: "%actions.index_file%"
tag: ul
action_id: contains_ul
required: false
- type: htmlContainsTag
html: "%actions.index_file%"
tag: ol
action_id: contains_ol
required: false
- type: gate
gates:
- left: "%actions.contains_ul%"
- left: "%actions.contains_ol%"
else:
type: createReview
body: 08e-list.md
event: REQUEST_CHANGES
- type: htmlContainsTag
html: "%actions.index_file%"
tag: li
action_id: contains_li
required: false
- type: gate
gates:
- left: "%actions.contains_li%"
else:
type: createReview
body: 08e-list.md
event: REQUEST_CHANGES
- type: createPullRequestComment
body: 09-add-links.md
file: index.html
position: 7
- title: Add links
description: Add links
event: pull_request.synchronize
link: "{{ repoUrl }}/pulls"
actions:
- type: getFileContents
filename: index.html
action_id: index_file
- type: htmlContainsTag
html: "%actions.index_file%"
tag: a
action_id: contains_a
required: false
- type: gate
left: "%actions.contains_a%"
else:
type: createReview
body: 09e-links.md
event: REQUEST_CHANGES
- type: createReview
body: 10-merge-third-pr.md
event: APPROVE
- title: Merge your third pull request
description: Merge your pull request
event: pull_request.closed
link: "{{ repoUrl }}/pulls"
actions:
- type: gate
left: "%payload.pull_request.merged%"
- type: mergeBranch
head: main
base: add-style
- type: createPullRequest
title: Add some style to your page
head: add-style
body: 11-link-css.md
action_id: new_pr
- type: respond
with: next.md
data:
issueURL: "%actions.new_pr.data.html_url%"
- title: Make it beautiful
description: Add some styles to your new site
event: pull_request.synchronize
link: "{{ repoUrl }}/pulls"
actions:
- type: getFileContents
filename: index.html
action_id: index
- type: gate
left: '/<link rel="stylesheet" href="style.css">/'
operator: test
right: "%actions.index%"
else:
type: respond
with: 11-style-fail.md
- type: removeBranchProtection
- type: respond
with: 11-style-success.md
- title: Merge the final pull request
description: Get ready to show off your new skills
event: pull_request.closed
link: "{{ repoUrl }}/pulls"
actions:
- type: gate
left: "%payload.pull_request.merged%"
- type: octokit
method: repos.getPages
owner: "%payload.repository.owner.login%"
repo: "%payload.repository.name%"
action_id: pagesUrl
- type: respond
with: 12-big-finish.md
data:
pagesUrl: "%actions.pagesUrl.data.html_url%"
tags:
- GitHub Pages