#!/bin/bash
#
# Build the lessons

source lessons.sh

for lesson in $(find ${NIGHTLY_DIR} -mindepth 1 -maxdepth 1 -type d)
do
    cd ${lesson}
    git pull origin gh-pages
    make -B preview
    cd -
done

#!/bin/bash
#
# Build the lessons

source lessons.sh

for lesson in $(find ${NIGHTLY_DIR} -mindepth 1 -maxdepth 1 -type d)
do
    cd ${lesson}
    git checkout -f gh-pages
    git pull origin gh-pages
    make -B preview
    cd -
done

Add checkout to allow pull
Add checkout to allow pull
