diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 5f32b923e5..9373f03d16 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -264,6 +264,39 @@ jobs: conda install -y -c conda-forge doxygen=1.9.5 conda install -y jinja2 pygments docutils ./build-public.sh + -name: deploy updated docs + run: |- + if [[ ${{ github.event_name }} == 'schedule' ]]; then + echo "Trigger: a nightly build. Deploying the docs." + git clone git@github.com:facebookmicrosites/habitat-website.git + cd habitat-website + git submodule update --init + for dir in habitat-sim habitat-lab + do + rm -rf published/docs/${dir} + cp -r ../habitat-sim/build/docs-public/${dir} published/docs/. + done + + git config --global user.name "Habitat" + git config --global user.email habitat@fb.com + NOW=$(date +"%m-%d-%Y") + git add . + git diff-index --quiet HEAD || git commit -m "Build habitat-sim and habitat-lab ${NOW}" + git push origin main + + # Deploy to public + git checkout gh-pages + git checkout main published + sudo apt-get update || true + sudo apt-get install -yq rsync + rsync -a published/ ./. + rm -rf published + git add . + git diff-index --quiet HEAD || git commit -m "Build habitat-sim and habitat-lab ${NOW}" + git push origin gh-pages + else + echo "Not a nightly build, no deployment needed." + fi build_conda_binaries: runs-on: 4-core-ubuntu-gpu-t4