diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..2da046f --- /dev/null +++ b/deploy.sh @@ -0,0 +1,10 @@ +# Deploy the docs to the `docs` branch. + +git branch -D docs-preview +git checkout -b docs-preview +sed -i '' '/dist/d' .gitignore +npm run build +git add . +git commit -m "Update docs" +git push origin docs-preview -f +git checkout - \ No newline at end of file diff --git a/package.json b/package.json index 9407fd2..3ce5931 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ "prepublishOnly": "npm run build", "docs:dev": "vitepress dev docs", "docs:build": "vitepress build docs", - "docs:preview": "vitepress preview docs" + "docs:preview": "vitepress preview docs", + "docs:deploy": "bash deploy.sh" }, "sideEffects": false, "devDependencies": {