Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit f441082

Browse files
authored
Update course format for accessibility (#4)
* Update course format for accessibility * outline step files * More automatic fixes * Manual fixes * manual fixes * run prettier * manual fixes * manual fixes
1 parent e7c2289 commit f441082

File tree

8 files changed

+142
-163
lines changed

8 files changed

+142
-163
lines changed
File renamed without changes.

.github/workflows/0-start.yml renamed to .github/workflows/0-welcome.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
name: Step 0, Start
1+
name: Step 0, Welcome
22

3-
# This step triggers after the learner creates a new repository from the template
4-
# This step sets STEP to 1
5-
# This step closes <details id=0> and opens <details id=1>
3+
# This step triggers after the learner creates a new repository from the template.
4+
# This workflow updates from step 0 to step 1.
65

7-
# This will run every time we create push a commit to `main`
8-
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
6+
# This will run every time we create push a commit to `main`.
7+
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
98
on:
109
create:
1110
workflow_dispatch:
1211

13-
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
12+
# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1413
permissions:
15-
# Need `contents: read` to checkout the repository
16-
# Need `contents: write` to update the step metadata
14+
# Need `contents: read` to checkout the repository.
15+
# Need `contents: write` to update the step metadata.
1716
contents: write
1817

1918
jobs:
@@ -24,34 +23,33 @@ jobs:
2423
- name: Checkout
2524
uses: actions/checkout@v3
2625
- id: get_step
27-
run: echo "::set-output name=current_step::$(cat ./.github/script/STEP)"
26+
run: echo "::set-output name=current_step::$(cat ./.github/steps/-step.txt)"
2827
outputs:
2928
current_step: ${{ steps.get_step.outputs.current_step }}
30-
29+
3130
on_start:
3231
name: On start
3332
needs: get_current_step
3433

3534
# We will only run this action when:
36-
# 1. This repository isn't the template repository
37-
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
38-
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
35+
# 1. This repository isn't the template repository.
36+
# Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
37+
# Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
3938
if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 0}}
4039

41-
# We'll run Ubuntu for performance instead of Mac or Windows
40+
# We'll run Ubuntu for performance instead of Mac or Windows.
4241
runs-on: ubuntu-latest
4342

4443
steps:
45-
# We'll need to check out the repository so that we can edit the README
44+
# We'll need to check out the repository so that we can edit the README.
4645
- name: Checkout
4746
uses: actions/checkout@v2
4847
with:
49-
fetch-depth: 0 # Let's get all the branches
48+
fetch-depth: 0 # Let's get all the branches.
5049

51-
# Update README to close <details id=0> and open <details id=1>
52-
# and set STEP to '1'
50+
# In README.md, switch step 0 for step 1.
5351
- name: Update to step 1
54-
uses: skills/action-update-step@v1
52+
uses: skills/action-update-step@v2
5553
with:
5654
token: ${{ secrets.GITHUB_TOKEN }}
5755
from_step: 0

.github/workflows/1-copilot-extension.yml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
name: Step 1, 1-Copilot Extension in a Codespace
22

3-
# This step triggers after push to main#devcontainer.json
4-
# This step sets STEP to 2
5-
# This step closes <details id=1> and opens <details id=2>
3+
# This step triggers after push to main#devcontainer.json.
4+
# This workflow updates from step 1 to step 2.
65

76
# This will run every time we main#devcontainer.json
8-
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
7+
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
98
on:
109
workflow_dispatch:
1110
push:
1211
paths:
13-
- '.devcontainer/devcontainer.json'
12+
- ".devcontainer/devcontainer.json"
1413
branches:
1514
- main
1615

17-
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
16+
# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1817
permissions:
19-
# Need `contents: read` to checkout the repository
20-
# Need `contents: write` to update the step metadata
18+
# Need `contents: read` to checkout the repository.
19+
# Need `contents: write` to update the step metadata.
2120
contents: write
2221

2322
jobs:
24-
# The purpose of this job is to output the current step number
25-
# (retreived from the STEP file). This output variable can
26-
# then be referenced in other jobs and used in conditional
23+
# The purpose of this job is to output the current step number
24+
# (retreived from the step file). This output variable can
25+
# then be referenced in other jobs and used in conditional.
2726
# expressions.
2827
get_current_step:
2928
name: Check current step number
@@ -32,41 +31,40 @@ jobs:
3231
- name: Checkout
3332
uses: actions/checkout@v3
3433
- id: get_step
35-
run: echo "::set-output name=current_step::$(cat ./.github/script/STEP)"
34+
run: echo "::set-output name=current_step::$(cat ./.github/steps/-step.txt)"
3635
outputs:
3736
current_step: ${{ steps.get_step.outputs.current_step }}
38-
37+
3938
on_add_devcontainer:
4039
name: On Add Devcontainer
4140
needs: get_current_step
4241

4342
# We will only run this action when:
44-
# 1. This repository isn't the template repository
45-
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
46-
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
43+
# 1. This repository isn't the template repository.
44+
# Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
45+
# Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
4746
if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 1 }}
4847

49-
# We'll run Ubuntu for performance instead of Mac or Windows
48+
# We'll run Ubuntu for performance instead of Mac or Windows.
5049
runs-on: ubuntu-latest
5150

5251
steps:
53-
# We'll need to check out the repository so that we can edit the README
52+
# We'll need to check out the repository so that we can edit the README.
5453
- name: Checkout
5554
uses: actions/checkout@v2
5655

57-
# Verify the learner added the file contents
56+
# Verify the learner added the file contents.
5857
- name: Check workflow contents, jobs
5958
run: |
6059
chmod a+x .github/script/check-file.sh
6160
./.github/script/check-file.sh
6261
env:
6362
FILE: ".devcontainer/devcontainer.json"
6463
SEARCH: "GitHub.copilot"
65-
66-
# Update README to close <details id=1> and open <details id=2>
67-
# and set STEP to '2'
64+
65+
# In README.md, switch step 1 for step 2.
6866
- name: Update to step 2
69-
uses: skills/action-update-step@v1
67+
uses: skills/action-update-step@v2
7068
with:
7169
token: ${{ secrets.GITHUB_TOKEN }}
7270
from_step: 1

.github/workflows/2-skills-javascript.yml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
name: Step 2, 2-Javascript function
22

3-
# This step triggers after push to main#skills.js
4-
# This step sets STEP to 3
5-
# This step closes <details id=2> and opens <details id=3>
3+
# This step triggers after push to main#skills.js.
4+
# This workflow updates from step 2 to step 3.
65

7-
# This will run every time we push to main#skills.js
8-
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
6+
# This will run every time we push to main#skills.js.
7+
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
98
on:
109
workflow_dispatch:
1110
push:
1211
paths:
13-
- 'skills.js'
12+
- "skills.js"
1413
branches:
1514
- main
1615

17-
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
16+
# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1817
permissions:
19-
# Need `contents: read` to checkout the repository
20-
# Need `contents: write` to update the step metadata
18+
# Need `contents: read` to checkout the repository.
19+
# Need `contents: write` to update the step metadata.
2120
contents: write
2221

2322
jobs:
24-
# The purpose of this job is to output the current step number
25-
# (retreived from the STEP file). This output variable can
26-
# then be referenced in other jobs and used in conditional
23+
# The purpose of this job is to output the current step number
24+
# (retreived from the step file). This output variable can
25+
# then be referenced in other jobs and used in conditional
2726
# expressions.
2827
get_current_step:
2928
name: Check current step number
@@ -32,29 +31,29 @@ jobs:
3231
- name: Checkout
3332
uses: actions/checkout@v2
3433
- id: get_step
35-
run: echo "::set-output name=current_step::$(cat ./.github/script/STEP)"
34+
run: echo "::set-output name=current_step::$(cat ./.github/steps/-step.txt)"
3635
outputs:
3736
current_step: ${{ steps.get_step.outputs.current_step }}
38-
37+
3938
on_functionadded:
4039
name: On Creation of a Javascript function
4140
needs: get_current_step
4241

4342
# We will only run this action when:
44-
# 1. This repository isn't the template repository
45-
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
46-
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
43+
# 1. This repository isn't the template repository.
44+
# Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
45+
# Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
4746
if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 2 }}
4847

49-
# We'll run Ubuntu for performance instead of Mac or Windows
48+
# We'll run Ubuntu for performance instead of Mac or Windows.
5049
runs-on: ubuntu-latest
5150

5251
steps:
53-
# We'll need to check out the repository so that we can edit the README
52+
# We'll need to check out the repository so that we can edit the README.
5453
- name: Checkout
5554
uses: actions/checkout@v3
5655
with:
57-
fetch-depth: 0 # Let's get all the branches
56+
fetch-depth: 0 # Let's get all the branches.
5857

5958
# Verify the PR updated package.json
6059
- name: Check package.json
@@ -65,11 +64,9 @@ jobs:
6564
FILE: "skills.js"
6665
SEARCH: "function calculateNumbers"
6766

68-
69-
# Update README to close <details id=2> and open <details id=3>
70-
# and set STEP to '3'
67+
# In README.md, switch step 2 for step 3.
7168
- name: Update to step 3
72-
uses: skills/action-update-step@v1
69+
uses: skills/action-update-step@v2
7370
with:
7471
token: ${{ secrets.GITHUB_TOKEN }}
7572
from_step: 2

.github/workflows/3-copilot-hub.yml

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
name: Step 3, 3-Copilot hub suggestion
22

3-
# This step triggers after push to main#member.js
4-
# This step sets STEP to 4
5-
# This step closes <details id=3> and opens <details id=4>
3+
# This step triggers after push to main#member.js.
4+
# This workflow updates from step 3 to step 4.
65

7-
# This will run every time we push to main#member.js
8-
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
6+
# This will run every time we push to main#member.js.
7+
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
98
on:
109
workflow_dispatch:
1110
push:
1211
paths:
13-
- 'member.js'
12+
- "member.js"
1413
branches:
1514
- main
1615

17-
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
16+
# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
1817
permissions:
19-
# Need `contents: read` to checkout the repository
20-
# Need `contents: write` to update the step metadata
18+
# Need `contents: read` to checkout the repository.
19+
# Need `contents: write` to update the step metadata.
2120
contents: write
2221

2322
jobs:
24-
# The purpose of this job is to output the current step number
25-
# (retreived from the STEP file). This output variable can
26-
# then be referenced in other jobs and used in conditional
23+
# The purpose of this job is to output the current step number
24+
# (retreived from the step file). This output variable can
25+
# then be referenced in other jobs and used in conditional
2726
# expressions.
2827
get_current_step:
2928
name: Check current step number
@@ -32,44 +31,42 @@ jobs:
3231
- name: Checkout
3332
uses: actions/checkout@v2
3433
- id: get_step
35-
run: echo "::set-output name=current_step::$(cat ./.github/script/STEP)"
34+
run: echo "::set-output name=current_step::$(cat ./.github/steps/-step.txt)"
3635
outputs:
3736
current_step: ${{ steps.get_step.outputs.current_step }}
38-
37+
3938
on_Copilothubsuggestions:
4039
name: On Copilot hub suggestion
4140
needs: get_current_step
4241

4342
# We will only run this action when:
44-
# 1. This repository isn't the template repository
45-
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts
46-
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions
43+
# 1. This repository isn't the template repository.
44+
# Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
45+
# Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
4746
if: ${{ !github.event.repository.is_template && needs.get_current_step.outputs.current_step == 3 }}
4847

49-
# We'll run Ubuntu for performance instead of Mac or Windows
48+
# We'll run Ubuntu for performance instead of Mac or Windows.
5049
runs-on: ubuntu-latest
5150

5251
steps:
53-
# We'll need to check out the repository so that we can edit the README
52+
# We'll need to check out the repository so that we can edit the README.
5453
- name: Checkout
5554
uses: actions/checkout@v3
5655
with:
57-
fetch-depth: 0 # Let's get all the branches
56+
fetch-depth: 0 # Let's get all the branches.
5857

59-
# Verify the skills member function is present
58+
# Verify the skills member function is present.
6059
- name: Check package for axios version 0.21.2
6160
run: |
6261
chmod a+x .github/script/check-file.sh
6362
./.github/script/check-file.sh
6463
env:
6564
FILE: "member.js"
6665
SEARCH: "skillsMember"
67-
68-
69-
# Update README to close <details id=3> and open <details id=4>
70-
# and set STEP to '4'
66+
67+
# In README.md, switch step 3 for step 4.
7168
- name: Update to step 4
72-
uses: skills/action-update-step@v1
69+
uses: skills/action-update-step@v2
7370
with:
7471
token: ${{ secrets.GITHUB_TOKEN }}
7572
from_step: 3

0 commit comments

Comments
 (0)