Skip to content

Commit

Permalink
Update docs on release
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang-33 committed Oct 6, 2023
1 parent 29cb4d3 commit 1433109
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 45 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/deploy-docs.yml

This file was deleted.

38 changes: 37 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
release:
types: [created]
jobs:
build:
release-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -16,3 +16,39 @@ jobs:
- run: npm run release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependency
run: npm ci
- name: Config Internal Git
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
- name: Clone Doc History
uses: actions/checkout@v4
with:
ref: 'gh-pages'
path: 'doc-dist'
- name: Clean Doc Directory
run: |
cd doc-dist
ls | grep -v '.git' | xargs rm -r
cd ../
- name: Build API Docs
run: export NODE_OPTIONS=--openssl-legacy-provider; npm run apidocs
- name: Build Docs
run: export NODE_OPTIONS=--openssl-legacy-provider; npm run docs:build
- name: Copy & Deploy
run: |
cp -r docs/.vuepress/dist/* doc-dist/
cd doc-dist
git add -A
git commit -m 'Deploy docs'
git push

0 comments on commit 1433109

Please sign in to comment.