Updated nyc_buildings to use higher res, have a dashboard, and explai… #444
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: push | |
jobs: | |
build_project: | |
name: Build project with Python 3.7 | |
runs-on: 'ubuntu-latest' | |
timeout-minutes: 60 | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
DESC: "Python 3.7 tests" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: "contains(github.event.head_commit.message, 'build:')" | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: "100" | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
- name: check project | |
id: vars | |
run: | | |
MSG="${{ github.event.head_commit.message }}" | |
MSG="${MSG##*build:}" | |
DIR="${MSG%%]*}" | |
echo "::set-output name=DIR::$DIR" | |
if [ -e ./$DIR ]; then | |
PROJECT_EXISTS=true | |
else | |
PROJECT_EXISTS=false | |
fi | |
echo "::set-output name=PROJECT_EXISTS::$PROJECT_EXISTS" | |
- name: conda setup | |
if: steps.vars.outputs.PROJECT_EXISTS == 'true' | |
run: | | |
eval "$(conda shell.bash hook)" | |
conda config --set always_yes True | |
conda install -c pyviz "pyctdev>=0.5" | |
doit ecosystem_setup | |
- name: build project | |
if: steps.vars.outputs.PROJECT_EXISTS == 'true' | |
run: | | |
eval "$(conda shell.bash hook)" | |
DIR=${{ steps.vars.outputs.DIR }} | |
doit archive_project --name $DIR | |
anaconda-project prepare --directory $DIR | |
source activate $DIR/envs/default && pip install pyctdev | |
conda install -y "conda-forge::myst-nb" "pyviz/label/dev::nbsite==0.7.0a7" holoviews sphinx_pyviz_theme selenium | |
conda install 'conda-forge::lxml' | |
doit build_project --name $DIR | |
- name: deploy project | |
if: steps.vars.outputs.PROJECT_EXISTS == 'true' | |
run: | | |
DIR=${{ steps.vars.outputs.DIR }} | |
git config user.email "[email protected]" | |
git config user.name "travis" | |
mv ./doc/$DIR ./tmp | |
git fetch https://github.com/${GITHUB_REPOSITORY}.git evaluated:refs/remotes/evaluated | |
git diff | |
git checkout evaluated || exit 1 | |
if [ -e ./doc/$DIR ]; then rm -rf ./doc/$DIR; fi | |
mkdir ./doc/$DIR | |
mv ./tmp/* ./doc/$DIR | |
git add ./doc/$DIR | |
git commit -m "adding $DIR" | |
git push -f -q "https://pyviz-developers:${{ secrets.GITHUB_TOKEN }}@github.com/pyviz-topics/examples.git" HEAD:evaluated |