From 3c9139bd5db29f048921c9f26cdd41063a675cea Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 15 Nov 2022 23:30:17 +0000 Subject: [PATCH] Unpack spec into right place for htmltest (#1338) Hopefully, fixes https://github.com/matrix-org/matrix-spec/issues/1336 --- .github/workflows/main.yml | 10 ++++++++-- changelogs/internal/newsfragments/1338.clarification | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 changelogs/internal/newsfragments/1338.clarification diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a77191d6..108bd23f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -172,7 +172,7 @@ jobs: htmlcheck: name: "🔎 Validate generated HTML" runs-on: ubuntu-latest - needs: [build-spec] + needs: [calculate-baseurl, build-spec] steps: - name: "📥 Source checkout" uses: actions/checkout@v2 @@ -183,8 +183,14 @@ jobs: name: spec-artifact - name: "📝 Unpack the spec" + # we have to unpack it into the right path given the baseurl, so that the + # links are correct. + # eg if baseurl is `/unstable`, we want to put the site in `spec/unstable`. run: | - tar -xvzf spec.tar.gz + mkdir -p "spec${baseURL}" + tar -C "spec${baseURL}" --strip-components=1 -xvzf spec.tar.gz + env: + baseURL: "${{ needs.calculate-baseurl.outputs.baseURL }}" - name: "Run htmltest" uses: wjdp/htmltest-action@master diff --git a/changelogs/internal/newsfragments/1338.clarification b/changelogs/internal/newsfragments/1338.clarification new file mode 100644 index 00000000..c5b60e24 --- /dev/null +++ b/changelogs/internal/newsfragments/1338.clarification @@ -0,0 +1 @@ +Use a link checker to ensure that we do not have broken links.