Merge pull request #9 from hotianbexuanto/main #27
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: npm run docs:build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
node-version: [22.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install | |
- name: Install VitePress | |
run: npm install vitepress | |
- name: Build | |
run: | | |
npm run docs:build | |
- name: Compress dist folder | |
run: tar -czvf dist.tar.gz .vitepress/dist/ | |
- name: Upload compressed dist files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-files | |
path: dist.tar.gz |