Merge pull request #10 from inaiat/feat/add-unit-result #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation | |
on: | |
push: | |
branches: | |
- docs | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install corepack | |
run: npm install -g corepack && corepack enable | |
- name: Install dependencies | |
run: pnpm install | |
- name: Generate documentation | |
run: pnpm typedoc | |
- name: Push to Wiki | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git clone https://github.com/${{ github.repository }}.wiki.git wiki | |
cp -R docs/* wiki/ | |
cd wiki | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.wiki.git | |
git add . | |
git commit -m "Update documentation" | |
git push |