Skip to content

Commit

Permalink
feat: update docs automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
SSShooter committed Sep 26, 2024
1 parent 67909b0 commit f4e5deb
Show file tree
Hide file tree
Showing 3 changed files with 2,303 additions and 1,780 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,27 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

- name: Checkout docs repository
uses: actions/checkout@v3
with:
repository: mind-elixir/docs
token: ${{ secrets.PAT }}
path: me-docs

- name: Copy build results to docs repository
run: |
cp -r ./md/* ./me-docs/docs/api
- name: Push changes to docs repository
run: |
cd me-docs
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
if git diff-index --quiet HEAD; then
echo "No changes to commit"
else
git commit -m "Update API documentation"
git push
fi
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"prepare": "husky install",
"lint": "eslint --cache --max-warnings 0 \"src/**/*.{js,json,ts}\" --fix",
"dev": "vite",
"build": "node build.js && tsc",
"build": "tsc && node build.js",
"tsc": "tsc",
"preview": "vite preview",
"test": "playwright test",
"test:ui": "playwright test --ui",
"doc": "npm run build && tsc && api-extractor run --local --verbose",
"doc": "api-extractor run --local --verbose",
"doc:md": "api-documenter markdown --input-folder ./api --output-folder ./md",
"beta": "npm run build && npm publish --tag beta"
},
Expand Down Expand Up @@ -87,5 +87,8 @@
"typescript": "^5.4.5",
"vite": "^4.5.3",
"vite-plugin-css-injected-by-js": "^3.5.1"
},
"dependencies": {
"@microsoft/api-documenter": "^7.25.14"
}
}
Loading

0 comments on commit f4e5deb

Please sign in to comment.