diff --git a/.circleci/config.yml b/.circleci/config.yml index b70d68f..719861e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,18 +57,19 @@ jobs: echo ${mapbox_token} > csharp/.mapbox_token make if [ "${CIRCLE_BRANCH}" == "main" ]; then - cd build/html + cd build git init git config user.name plotlydocbot git config user.email accounts@plot.ly - git add * + git add csharp/*.html + git add fsharp/*.html git commit -m "build of https://github.com/plotly/plotly.net-docs/commit/${CIRCLE_SHA1}" git push --force git@github.com:plotly/plotly.net-docs.git master:built rm -rf .git cd ../.. fi - tar -zcf build/html.tgz build/html - rm -rf build/html + tar -zcf build.tgz build + rm -rf build - store_artifacts: path: build destination: build diff --git a/Makefile b/Makefile deleted file mode 100644 index d7de3bc..0000000 --- a/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -export PLOTLY_RENDERER=notebook_connected - -MD_DIR_FSharp ?= fsharp -UNCONV_DIR_FSharp ?= unconverted/fsharp -IPYNB_DIR_FSharp ?= build/fsharp/ipynb -HTML_DIR ?= build/html -FAIL_DIR ?= build/failures - -MD_FILES := $(shell ls $(MD_DIR_FSharp)/*.md) -UNCONV_FILES := $(shell ls $(UNCONV_DIR_FSharp)/*.md) - -IPYNB_FILES := $(patsubst $(MD_DIR_FSharp)/%.md,$(IPYNB_DIR_FSharp)/%.ipynb,$(MD_FILES)) -HTML_FILES := $(patsubst $(MD_DIR_FSharp)/%.md,$(HTML_DIR)/2019-07-03-%.html,$(MD_FILES)) - - -all: $(HTML_FILES) - -.PRECIOUS: $(IPYNB_FILES) - -$(IPYNB_DIR_FSharp)/.mapbox_token: $(MD_DIR_FSharp)/.mapbox_token - @mkdir -p $(IPYNB_DIR_FSharp) - @echo "[symlink] .mapbox_token" - @cd $(IPYNB_DIR_FSharp) && ln -s ../../$< - -$(IPYNB_FILES): $(IPYNB_DIR_FSharp)/.mapbox_token - -$(IPYNB_DIR_FSharp)/%.ipynb: $(MD_DIR_FSharp)/%.md - @mkdir -p $(IPYNB_DIR_FSharp) - @echo "[jupytext] $<" - @cat $< what_about_dash.md | jupytext --to notebook --quiet --output $@ - -$(HTML_DIR)/2019-07-03-%.html: $(IPYNB_DIR_FSharp)/%.ipynb - @mkdir -p $(HTML_DIR) - @mkdir -p $(FAIL_DIR) - @echo "[nbconvert] $<" - @jupyter nbconvert $< --to html --template nb.tpl \ - --ExecutePreprocessor.timeout=600\ - --output-dir $(HTML_DIR) --output 2019-07-03-$*.html \ - --execute > $(FAIL_DIR)/$* 2>&1 && rm -f $(FAIL_DIR)/$* - - - -MD_DIR_CSharp ?= csharp -UNCONV_DIR_CSharp ?= unconverted/csharp -IPYNB_DIR_CSharp ?= build/csharp/ipynb -HTML_DIR ?= build/html -FAIL_DIR ?= build/failures - -MD_FILES := $(shell ls $(MD_DIR_CSharp)/*.md) -UNCONV_FILES := $(shell ls $(UNCONV_DIR_CSharp)/*.md) - -IPYNB_FILES := $(patsubst $(MD_DIR_CSharp)/%.md,$(IPYNB_DIR_CSharp)/%.ipynb,$(MD_FILES)) -HTML_FILES := $(patsubst $(MD_DIR_CSharp)/%.md,$(HTML_DIR)/2019-08-03-%.html,$(MD_FILES)) - - -all: $(HTML_FILES) - -.PRECIOUS: $(IPYNB_FILES) - -$(IPYNB_DIR_CSharp)/.mapbox_token: $(MD_DIR_CSharp)/.mapbox_token - @mkdir -p $(IPYNB_DIR_CSharp) - @echo "[symlink] .mapbox_token" - @cd $(IPYNB_DIR_CSharp) && ln -s ../../$< - -$(IPYNB_FILES): $(IPYNB_DIR_CSharp)/.mapbox_token - -$(IPYNB_DIR_CSharp)/%.ipynb: $(MD_DIR_CSharp)/%.md - @mkdir -p $(IPYNB_DIR_CSharp) - @echo "[jupytext] $<" - @cat $< what_about_dash.md | jupytext --to notebook --quiet --output $@ - -$(HTML_DIR)/2019-08-03-%.html: $(IPYNB_DIR_CSharp)/%.ipynb - @mkdir -p $(HTML_DIR) - @mkdir -p $(FAIL_DIR) - @echo "[nbconvert] $<" - @jupyter nbconvert $< --to html --template nb.tpl \ - --ExecutePreprocessor.timeout=600\ - --output-dir $(HTML_DIR) --output 2019-08-03-$*.html \ - --execute > $(FAIL_DIR)/$* 2>&1 && rm -f $(FAIL_DIR)/$* diff --git a/csharp/creating-and-upadting-figures.md b/csharp/creating-and-updating-figures.md similarity index 100% rename from csharp/creating-and-upadting-figures.md rename to csharp/creating-and-updating-figures.md diff --git a/makefile b/makefile new file mode 100644 index 0000000..6bc1bbe --- /dev/null +++ b/makefile @@ -0,0 +1,79 @@ +export PLOTLY_RENDERER=notebook_connected + +MD_DIR_FSharp ?= fsharp +UNCONV_DIR_FSharp ?= unconverted/fsharp +IPYNB_DIR_FSharp ?= build/fsharp/ipynb +HTML_DIR_FSharp ?= build/fsharp +FAIL_DIR_FSharp ?= build/fsharp/failures + +MD_FILES_FSharp := $(shell ls $(MD_DIR_FSharp)/*.md) +UNCONV_FILES_FSharp := $(shell ls $(UNCONV_DIR_FSharp)/*.md) + +IPYNB_FILES_FSharp := $(patsubst $(MD_DIR_FSharp)/%.md,$(IPYNB_DIR_FSharp)/%.ipynb,$(MD_FILES_FSharp)) +HTML_FILES_FSharp := $(patsubst $(MD_DIR_FSharp)/%.md,$(HTML_DIR_FSharp)/2019-07-03-%.html,$(MD_FILES_FSharp)) + + +all: $(HTML_FILES_FSharp) + +.PRECIOUS: $(IPYNB_FILES_FSharp) + +$(IPYNB_DIR_FSharp)/.mapbox_token: $(MD_DIR_FSharp)/.mapbox_token + @mkdir -p $(IPYNB_DIR_FSharp) + @echo "[symlink] .mapbox_token" + @cd $(IPYNB_DIR_FSharp) && ln -s ../../$< + +$(IPYNB_FILES_FSharp): $(IPYNB_DIR_FSharp)/.mapbox_token + +$(IPYNB_DIR_FSharp)/%.ipynb: $(MD_DIR_FSharp)/%.md + @mkdir -p $(IPYNB_DIR_FSharp) + @echo "[jupytext] $<" + @cat $< what_about_dash.md | jupytext --to notebook --quiet --output $@ + +$(HTML_DIR_FSharp)/2019-07-03-%.html: $(IPYNB_DIR_FSharp)/%.ipynb + @mkdir -p $(HTML_DIR_FSharp) + @mkdir -p $(FAIL_DIR_FSharp) + @echo "[nbconvert] $<" + @jupyter nbconvert $< --to html --template nb.tpl \ + --ExecutePreprocessor.timeout=600\ + --output-dir $(HTML_DIR_FSharp) --output 2019-07-03-$*.html \ + --execute > $(FAIL_DIR_FSharp)/$* 2>&1 && rm -f $(FAIL_DIR_FSharp)/$* + + + +MD_DIR_CSharp ?= csharp +UNCONV_DIR_CSharp ?= unconverted/csharp +IPYNB_DIR_CSharp ?= build/csharp/ipynb +HTML_DIR_CSharp ?= build/csharp +FAIL_DIR_CSharp ?= build/csharp/failures + +MD_FILES_CSharp := $(shell ls $(MD_DIR_CSharp)/*.md) +UNCONV_FILES_CSharp := $(shell ls $(UNCONV_DIR_CSharp)/*.md) + +IPYNB_FILES_CSharp := $(patsubst $(MD_DIR_CSharp)/%.md,$(IPYNB_DIR_CSharp)/%.ipynb,$(MD_FILES_CSharp)) +HTML_FILES_CSharp := $(patsubst $(MD_DIR_CSharp)/%.md,$(HTML_DIR_CSharp)/2019-08-03-%.html,$(MD_FILES_CSharp)) + + +all: $(HTML_FILES_CSharp) + +.PRECIOUS: $(IPYNB_FILES_CSharp) + +$(IPYNB_DIR_CSharp)/.mapbox_token: $(MD_DIR_CSharp)/.mapbox_token + @mkdir -p $(IPYNB_DIR_CSharp) + @echo "[symlink] .mapbox_token" + @cd $(IPYNB_DIR_CSharp) && ln -s ../../$< + +$(IPYNB_FILES_CSharp): $(IPYNB_DIR_CSharp)/.mapbox_token + +$(IPYNB_DIR_CSharp)/%.ipynb: $(MD_DIR_CSharp)/%.md + @mkdir -p $(IPYNB_DIR_CSharp) + @echo "[jupytext] $<" + @cat $< what_about_dash.md | jupytext --to notebook --quiet --output $@ + +$(HTML_DIR_CSharp)/2019-08-03-%.html: $(IPYNB_DIR_CSharp)/%.ipynb + @mkdir -p $(HTML_DIR_CSharp) + @mkdir -p $(FAIL_DIR_CSharp) + @echo "[nbconvert] $<" + @jupyter nbconvert $< --to html --template nb.tpl \ + --ExecutePreprocessor.timeout=600\ + --output-dir $(HTML_DIR_CSharp) --output 2019-08-03-$*.html \ + --execute > $(FAIL_DIR_CSharp)/$* 2>&1 && rm -f $(FAIL_DIR_CSharp)/$*