diff --git a/.gitignore b/.gitignore
index 24fde2e5a..21ab53e28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
**/.vscode
install/
api-docs/
+api-docs-repo/
diff --git a/Makefile b/Makefile
index adb206730..6c72a7418 100644
--- a/Makefile
+++ b/Makefile
@@ -303,17 +303,19 @@ dep-graph:
docs:
cargo doc --features=backend-singlepass,backend-cranelift,backend-llvm,docs,wasi,managed
cd lib/runtime-c-api/ && doxygen doxyfile && cd ..
-
-docs-publish:
- git clone -b "gh-pages" --depth=1 https://wasmerbot:${GITHUB_DOCS_TOKEN}@github.com/wasmerio/wasmer.git api-docs
+ mkdir -p api-docs
mkdir -p api-docs/c
cp -R target/doc api-docs/rust
cp -R lib/runtime-c-api/doc/html api-docs/c/runtime-c-api
echo '' > api-docs/index.html
echo '' > api-docs/rust/index.html
- cd api-docs && git add index.html rust/* c/*
- cd api-docs && git commit -m "Publishing GitHub Pages ***CI***"
- cd api-docs && git push origin gh-pages
+
+docs-publish:
+ git clone -b "gh-pages" --depth=1 https://wasmerbot:${GITHUB_DOCS_TOKEN}@github.com/wasmerio/wasmer.git api-docs-repo
+ cp -R api-docs/* api-docs-repo
+ cd api-docs-repo && git add index.html rust/* c/*
+ cd api-docs-repo && git commit -m "Publishing GitHub Pages ***CI***"
+ cd api-docs-repo && git push origin gh-pages
wapm:
cargo build --release --manifest-path wapm-cli/Cargo.toml --features "telemetry update-notifications"