Skip to content

Commit 1bc5386

Browse files
authored
Add GitHub action to publish 2.1 ED updates (#4180)
This adds an action to the `WCAG-2.1` branch to update files on the gh-pages branch related to 2.1 guidelines, which reside directly under `guidelines/` (not under a subfolder). Prior to this, the editor's draft for WCAG 2.1 has not been updated since shortly after its first publication.
1 parent 2f7fd95 commit 1bc5386

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/21ed-publish.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Push 2.1 ED to gh-pages branch
2+
3+
# Reference documentation: https://docs.github.com/en/actions/reference
4+
5+
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
6+
on:
7+
push:
8+
branches: [WCAG-2.1]
9+
10+
jobs:
11+
main:
12+
name: deploy
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- name: Checkout the repository
16+
uses: actions/checkout@v4
17+
with:
18+
ref: WCAG-2.1
19+
- name: Checkout gh-pages
20+
uses: actions/checkout@v4
21+
with:
22+
ref: gh-pages
23+
path: _site
24+
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
25+
- name: Build
26+
run: |
27+
cp guidelines/guidelines.css guidelines/relative-luminance.html _site/guidelines
28+
curl https://labs.w3.org/spec-generator/?type=respec"&"url=https://raw.githack.com/$GITHUB_REPOSITORY/WCAG-2.1/guidelines/index.html -o _site/guidelines/index.html -f --retry 3
29+
- name: Push
30+
uses: stefanzweifel/git-auto-commit-action@v5
31+
with:
32+
repository: _site
33+
branch: gh-pages
34+
commit_user_name: w3cgruntbot
35+
commit_user_email: 87540780+w3cgruntbot@users.noreply.github.com
36+
commit_author: "w3cgruntbot <87540780+w3cgruntbot@users.noreply.github.com>"
37+
commit_message: ":robot: Deploy to GitHub Pages: ${{ github.sha }} from branch ${{ github.ref }}"
38+
skip_fetch: true
39+
skip_checkout: true

0 commit comments

Comments
 (0)