-
Notifications
You must be signed in to change notification settings - Fork 257
45 lines (42 loc) · 1.81 KB
/
11ty-publish.yaml
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
name: CI
# 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: [main]
jobs:
main:
name: deploy (11ty)
runs-on: ubuntu-20.04
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: _site
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
- name: Install Node.js and dependencies
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.nvmrc'
- name: Build
env:
WCAG_MODE: editors
run: |
npm i
npm run build
cp guidelines/guidelines.css guidelines/relative-luminance.html _site/guidelines/22
curl https://labs.w3.org/spec-generator/?type=respec"&"url=https://raw.githack.com/$GITHUB_REPOSITORY/main/guidelines/index.html -o _site/guidelines/22/index.html -f --retry 3
curl https://labs.w3.org/spec-generator/?type=respec"&"url=https://raw.githack.com/$GITHUB_REPOSITORY/main/requirements/22/index.html -o _site/requirements/22/index.html -f --retry 3
curl https://labs.w3.org/spec-generator/?type=respec"&"url=https://raw.githack.com/$GITHUB_REPOSITORY/main/conformance-challenges/index.html -o _site/conformance-challenges/index.html -f --retry 3
- name: Push
working-directory: _site
run: |
git config user.email [email protected]
git config user.name w3cgruntbot
git add -A .
git commit -m ":robot: Deploy to GitHub Pages: $GITHUB_SHA from branch $GITHUB_REF"
git push origin gh-pages