From e992339cac61a139b3fe62415843c93919f7900d Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Wed, 21 Sep 2022 12:52:53 -0700 Subject: [PATCH 1/2] Use spec-prod instead of a Makefile to build the spec. --- .github/workflows/build.yml | 22 +++++++++------------- Makefile | 30 ------------------------------ 2 files changed, 9 insertions(+), 43 deletions(-) delete mode 100644 Makefile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 942b3585..c7bba796 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,22 +1,18 @@ name: Build on: - pull_request: - branches: - - master + pull_request: {} push: branches: - master jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - name: Build - run: make ci - - name: Deploy - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./out + - uses: actions/checkout@v3 + - uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + SOURCE: spec.bs + GH_PAGES_BRANCH: gh-pages + BUILD_FAIL_ON: warning diff --git a/Makefile b/Makefile deleted file mode 100644 index ceb7a537..00000000 --- a/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -SHELL=/bin/bash - -local: spec.bs - bikeshed --die-on=warning spec spec.bs spec.html - -watch: spec.bs - bikeshed watch --die-on=warning spec.bs spec.html - -spec.html: spec.bs - @ (HTTP_STATUS=$$(curl https://api.csswg.org/bikeshed/ \ - --output spec.html \ - --write-out "%{http_code}" \ - --header "Accept: text/plain, text/html" \ - -F die-on=warning \ - -F file=@spec.bs) && \ - [[ "$$HTTP_STATUS" -eq "200" ]]) || ( \ - echo ""; cat spec.html; echo ""; \ - rm -f spec.html; \ - exit 22 \ - ); - -remote: spec.html - -ci: spec.bs - mkdir -p out - make remote - mv spec.html out/index.html - -clean: - rm spec.html From 5428a814ac305b2a4c9cbc5b57852861a84a0d5e Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Thu, 22 Sep 2022 08:48:19 -0700 Subject: [PATCH 2/2] Restore the Makefile for human use. --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..61290f64 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +SHELL=/bin/bash + +local: spec.bs + bikeshed --die-on=warning spec spec.bs spec.html + +watch: spec.bs + bikeshed watch --die-on=warning spec.bs spec.html + +spec.html: spec.bs + @ (HTTP_STATUS=$$(curl https://api.csswg.org/bikeshed/ \ + --output spec.html \ + --write-out "%{http_code}" \ + --header "Accept: text/plain, text/html" \ + -F die-on=warning \ + -F file=@spec.bs) && \ + [[ "$$HTTP_STATUS" -eq "200" ]]) || ( \ + echo ""; cat spec.html; echo ""; \ + rm -f spec.html; \ + exit 22 \ + ); + +remote: spec.html + +clean: + rm spec.html