From 15d207686192df705398d1a606c95b901103b4e8 Mon Sep 17 00:00:00 2001 From: Tovmas Date: Thu, 7 Dec 2023 04:16:03 +0400 Subject: [PATCH] Build jekyll before checking broken links --- .github/workflows/ci.yaml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 16f97a91..4c70de33 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,17 +39,11 @@ jobs: run: pip install -r .github/tests/requirements.txt - name: Build Jekyll site - run: bundle exec jekyll serve --detach + run: bundle exec jekyll build env: - JEKYLL_ENV: production + JEKYLL_ENV: development PAGES_REPO_NWO: ${{ github.repository }} - - name: Update pytest - run: pip install --upgrade pytest pytest-asyncio - - - name: Run tests - run: pytest .github/tests - - name: Check broken links to pages run: | bundle exec htmlproofer _site \ @@ -59,4 +53,19 @@ jobs: --allow-missing-href true \ --check-internal-hash true env: - JEKYLL_ENV: production \ No newline at end of file + JEKYLL_ENV: development + + - name: Serve Jekyll site + run: bundle exec jekyll serve --detach + env: + JEKYLL_ENV: production + PAGES_REPO_NWO: ${{ github.repository }} + + - name: Update pytest + run: pip install --upgrade pytest pytest-asyncio + + - name: Run tests + run: pytest .github/tests + + - name: Stop Jekyll server + run: pkill -f 'bundle exec jekyll serve' || true \ No newline at end of file