File tree 5 files changed +17
-35
lines changed
5 files changed +17
-35
lines changed Original file line number Diff line number Diff line change 31
31
git config --global user.name " $GITHUB_ACTOR "
32
32
git config --global user.email " $GITHUB_ACTOR @users.noreply.github.com"
33
33
34
- mkdocs build --config-file " ${GITHUB_WORKSPACE} /docs/mkdocs.yml"
34
+ docs_site_tmp_dir=$( mktemp -d)
35
+ cd docs && mkdocs build --config-file " ${GITHUB_WORKSPACE} /docs/mkdocs.yml" -d " ${docs_site_tmp_dir} "
35
36
36
- git clone --branch=gh-pages --depth=1 " ${remote_repo} " gh-pages
37
- cd gh-pages
37
+ gh_pages_tmp_dir=$( mktemp -d)
38
+
39
+ cd $gh_pages_tmp_dir
40
+ git clone --branch=gh-pages --depth=1 " ${remote_repo} " .
38
41
39
42
# copy current index file index.yaml before any change
40
43
temp_worktree=$( mktemp -d)
41
- cp --force " index.yaml" " $temp_worktree /index.yaml"
44
+ if [ -f " index.yaml" ]; then
45
+ cp --force " index.yaml" " $temp_worktree /index.yaml"
46
+ fi
42
47
# remove current content in branch gh-pages
43
48
git rm -r .
44
49
# copy new doc.
45
- cp -r ../site/* .
50
+ cp -r " ${docs_site_tmp_dir} " /* .
51
+
46
52
# restore chart index
47
- cp " $temp_worktree /index.yaml" .
53
+ if [ -f " index.yaml" ]; then
54
+ cp " $temp_worktree /index.yaml" .
55
+ fi
56
+
48
57
# commit changes
49
58
git add .
50
59
git commit -m " Deploy GitHub Pages"
Original file line number Diff line number Diff line change 49
49
- name : Deploy
50
50
uses : ./.github/actions/mkdocs
51
51
env :
52
- PERSONAL_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
52
+ PERSONAL_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
Original file line number Diff line number Diff line change 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
-
9
1
.PHONY : build-image
10
2
build-image :
11
3
@docker build \
@@ -29,11 +21,3 @@ live-docs: build-image ## Build and launch a local copy of the documentation web
29
21
--entrypoint /bin/bash \
30
22
xpdb-docs \
31
23
-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
- .
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ repo_name: "form3tech-oss/x-pdb"
3
3
repo_url : https://github.com/form3tech-oss/x-pdb
4
4
site_url : https://form3tech-oss.github.io/x-pdb
5
5
edit_uri : edit/main/docs/src
6
- docs_dir : " /docs/ src"
6
+ docs_dir : " src"
7
7
8
8
# Extensions
9
9
markdown_extensions :
@@ -63,8 +63,6 @@ plugins:
63
63
- minify :
64
64
minify_html : true
65
65
66
- extra_css : [extra.css]
67
-
68
66
nav :
69
67
- Introduction :
70
68
- Overview : " index.md"
You can’t perform that action at this time.
0 commit comments