Skip to content

Commit 22f47ff

Browse files
committed
Use GitHub workflows to publish the spec
1 parent be2bb71 commit 22f47ff

File tree

4 files changed

+46
-3934
lines changed

4 files changed

+46
-3934
lines changed

.github/workflows/build.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Build
16+
run: make ci
17+
- name: Deploy
18+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
19+
uses: peaceiris/actions-gh-pages@v3
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
publish_dir: ./out

Makefile

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1-
all: index.html
1+
SHELL=/bin/bash
22

3-
force:
4-
bikeshed -f spec ./index.src.html
3+
.PHONY: ci clean local remote
54

6-
index.html: index.src.html
7-
bikeshed -f spec ./index.src.html
5+
local: index.bs
6+
bikeshed --die-on=warning spec index.bs index.html
87

9-
publish:
10-
git push origin master master:gh-pages
8+
remote: index.html
119

10+
ci: index.bs index.html
11+
mkdir -p out
12+
cp index.html out/
13+
14+
clean:
15+
rm index.html
16+
17+
index.html: index.bs
18+
@ (HTTP_STATUS=$$(curl https://api.csswg.org/bikeshed/ \
19+
--output index.html \
20+
--write-out "%{http_code}" \
21+
--header "Accept: text/plain, text/html" \
22+
-F die-on=warning \
23+
24+
[[ "$$HTTP_STATUS" -eq "200" ]]) || ( \
25+
echo ""; cat index.html; echo ""; \
26+
rm -f index.html; \
27+
exit 22 \
28+
);

index.src.html index.bs

File renamed without changes.

0 commit comments

Comments
 (0)