From 7b9c9a41b9de799fcbfff7c25d4f69b83a188178 Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Fri, 18 Aug 2023 14:28:33 +0200 Subject: [PATCH] [ci] Make deploys fail if the spec build fails (#56) Our CI deploy action currently asks a server at api.csswg.org to build the spec, and then uses the response to that request as the build output. However, it does not check that the response's HTTP status code is successful, which can result in Internal Server Errors in that server being "propagated" to this spec, rather than resulting in a failed build. Similarly, fatal errors in building the spec (for invalid Bikeshed syntax, for example) would result in the list of errors being deployed. This PR fixes that by allowing `curl` to fail for non-successful HTTP status codes. --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7040cb9..b675351 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: - name: Build spec run: | mkdir -p out - curl --retry 2 https://api.csswg.org/bikeshed/ --output out/index.html --header "Accept: text/plain, text/html" -F die-on=fatal -F file=@"index.bs" + curl --retry 2 --fail https://api.csswg.org/bikeshed/ --output out/index.html --header "Accept: text/plain, text/html" -F die-on=fatal -F file=@"index.bs" - name: Upload to Deno Deploy uses: denoland/deployctl@v1 with: