From 366e00d2ea53383276641e1e0d1a12d26dfd28c2 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Wed, 29 Dec 2021 20:32:40 +0000 Subject: [PATCH] Try with nox --- .github/workflows/validate.yml | 15 ++++++--------- noxfile.py | 5 +++++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 57a491d5..db6dce21 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -21,13 +21,15 @@ jobs: - name: Build the site in the Jekyll/builder container run: | - docker run \ - -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ - jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future" - + pip install nox + nox -s build_no_serve + - name: List result of Jekyll build run: ls _site/ -l + - name: Copy assets + run: cp -r assets _site/assets + - name: Publish built site uses: actions/upload-artifact@v2 with: @@ -70,9 +72,6 @@ jobs: name: Built site ${{ github.run_number }} path: ./_site - - name: Copy assets - run: cp -r assets _site/assets - # TODO: we are not checking absolute links as pytest plugins does not support them - name: Check links run: | @@ -86,8 +85,6 @@ jobs: needs: [build] steps: - - name: Fetch repository - uses: actions/checkout@v2 - name: Fetch built site uses: actions/download-artifact@v2 with: diff --git a/noxfile.py b/noxfile.py index 4b2054c1..46ce4283 100644 --- a/noxfile.py +++ b/noxfile.py @@ -16,3 +16,8 @@ def install_deps(session): def build(session): install_deps(session) session.run(*"bundle exec jekyll serve liveserve".split()) + +@nox.session(venv_backend='conda') +def build_no_serve(session): + install_deps(session) + session.run(*"bundle exec jekyll".split())