Skip to content

Commit

Permalink
Add GitHub action to publish 2.1 ED updates (#4180)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kfranqueiro authored Jan 15, 2025
1 parent 2f7fd95 commit 1bc5386
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/21ed-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Push 2.1 ED to gh-pages branch

# Reference documentation: https://docs.github.com/en/actions/reference

# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
on:
push:
branches: [WCAG-2.1]

jobs:
main:
name: deploy
runs-on: ubuntu-20.04
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
ref: WCAG-2.1
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: _site
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
- name: Build
run: |
cp guidelines/guidelines.css guidelines/relative-luminance.html _site/guidelines
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
- name: Push
uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: _site
branch: gh-pages
commit_user_name: w3cgruntbot
commit_user_email: 87540780+w3cgruntbot@users.noreply.github.com
commit_author: "w3cgruntbot <87540780+w3cgruntbot@users.noreply.github.com>"
commit_message: ":robot: Deploy to GitHub Pages: ${{ github.sha }} from branch ${{ github.ref }}"
skip_fetch: true
skip_checkout: true

0 comments on commit 1bc5386

Please sign in to comment.