Skip to content

Commit

Permalink
Try with nox
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Dec 29, 2021
1 parent 52a7964 commit 366e00d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand All @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

0 comments on commit 366e00d

Please sign in to comment.