Skip to content

Commit d7a5d6d

Browse files
chore: test docs publish
Signed-off-by: Moritz Johner <[email protected]>
1 parent 17905ec commit d7a5d6d

File tree

4 files changed

+9
-33
lines changed

4 files changed

+9
-33
lines changed

Diff for: .github/actions/mkdocs/action.sh

+8-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
set -e
17+
set -xe
1818

1919
REQUIREMENTS="${GITHUB_WORKSPACE}/docs/requirements.txt"
2020

@@ -31,18 +31,21 @@ fi
3131
git config --global user.name "$GITHUB_ACTOR"
3232
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
3333

34-
mkdocs build --config-file "${GITHUB_WORKSPACE}/docs/mkdocs.yml"
34+
docs_site_tmp_dir=$(mktemp)
35+
cd docs && mkdocs build --config-file "${GITHUB_WORKSPACE}/docs/mkdocs.yml" -d "${docs_site_tmp_dir}"
3536

36-
git clone --branch=gh-pages --depth=1 "${remote_repo}" gh-pages
37-
cd gh-pages
37+
gh_pages_tmp_dir=$(mktemp)
38+
39+
cd $gh_pages_tmp_dir
40+
git clone --branch=gh-pages --depth=1 "${remote_repo}" .
3841

3942
# copy current index file index.yaml before any change
4043
temp_worktree=$(mktemp -d)
4144
cp --force "index.yaml" "$temp_worktree/index.yaml"
4245
# remove current content in branch gh-pages
4346
git rm -r .
4447
# copy new doc.
45-
cp -r ../site/* .
48+
cp -r "${docs_site_tmp_dir}"/* .
4649
# restore chart index
4750
cp "$temp_worktree/index.yaml" .
4851
# commit changes

Diff for: docs/Makefile

-16
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
.PHONY: check_dead_links
2-
check_dead_links: ## Check if the documentation contains dead links.
3-
@docker run -t \
4-
-w /tmp \
5-
-v $$PWD:/tmp dkhamsing/awesome_bot:1.20.0 \
6-
--allow-dupe \
7-
--allow-redirect $(shell find $$PWD -mindepth 1 -name vendor -prune -o -name .modcache -prune -o -iname Changelog.md -prune -o -name "*.md" | sed -e "s#$$PWD/##")
8-
91
.PHONY: build-image
102
build-image:
113
@docker build \
@@ -29,11 +21,3 @@ live-docs: build-image ## Build and launch a local copy of the documentation web
2921
--entrypoint /bin/bash \
3022
xpdb-docs \
3123
-c "pip install -r /docs/requirements.txt && mkdocs serve --dev-addr=0.0.0.0:8000"
32-
33-
.PHONY: misspell
34-
misspell: ## Check for spelling errors.
35-
@go install github.com/client9/misspell/cmd/misspell@latest
36-
misspell \
37-
-locale US \
38-
-error \
39-
.

Diff for: docs/extra.css

-9
This file was deleted.

Diff for: docs/mkdocs.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repo_name: "form3tech-oss/x-pdb"
33
repo_url: https://github.com/form3tech-oss/x-pdb
44
site_url: https://form3tech-oss.github.io/x-pdb
55
edit_uri: edit/main/docs/src
6-
docs_dir: "/docs/src"
6+
docs_dir: "src"
77

88
# Extensions
99
markdown_extensions:
@@ -63,8 +63,6 @@ plugins:
6363
- minify:
6464
minify_html: true
6565

66-
extra_css: [extra.css]
67-
6866
nav:
6967
- Introduction:
7068
- Overview: "index.md"

0 commit comments

Comments
 (0)