From 37a52afacda20dc610656dcac2d7f567a2074686 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Tue, 5 Apr 2022 15:04:15 +0200 Subject: [PATCH] ci: fix gh docs action (#11547) * ci: fix gh docs action * create cname after loop --- .github/workflows/deploy-docs.yml | 2 +- .gitignore | 1 - Makefile | 8 +++++--- docs/output/CNAME | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 docs/output/CNAME diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 2a5893ff4c..55e925fd04 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -29,5 +29,5 @@ jobs: uses: JamesIves/github-pages-deploy-action@v4.3.0 with: branch: gh-pages - folder: docs/output + folder: ~/output single-commit: true diff --git a/.gitignore b/.gitignore index a7006f2136..146e44fc94 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,6 @@ private # Build vendor build -docs/output docs/_build docs/tutorial docs/node_modules diff --git a/Makefile b/Makefile index a29e5866d3..0c598af97c 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git DOCKER := $(shell which docker) DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8 PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git) +DOCS_DOMAIN=docs.cosmos.network # RocksDB is a native dependency, so we don't assume the library is installed. # Instead, it must be explicitly enabled and we warn when it is not. ENABLE_ROCKSDB ?= false @@ -198,10 +199,11 @@ build-docs: while read -r branch path_prefix; do \ echo "building branch $${branch}" ; \ (git clean -fdx && git reset --hard && git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \ - mkdir -p output/$${path_prefix} ; \ - cp -r .vuepress/dist/* output/$${path_prefix}/ ; \ - cp output/$${path_prefix}/index.html output ; \ + mkdir -p ~/output/$${path_prefix} ; \ + cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \ + cp ~/output/$${path_prefix}/index.html ~/output ; \ done < versions ; + @echo $(DOCS_DOMAIN) > ~/output/CNAME .PHONY: build-docs diff --git a/docs/output/CNAME b/docs/output/CNAME deleted file mode 100644 index 784f0db986..0000000000 --- a/docs/output/CNAME +++ /dev/null @@ -1 +0,0 @@ -docs.cosmos.network \ No newline at end of file