update #130
This file contains hidden or 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: Build & Deploy VitePress Site | |
| # Give GITHUB_TOKEN permission to push commits | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Install dependencies | |
| run: npm ci | |
| env: | |
| # CI only builds the VitePress site; it never generates PDFs, | |
| # so skip Puppeteer's Chrome download (it can't reach Google's | |
| # servers from the runner and would fail the install). | |
| PUPPETEER_SKIP_DOWNLOAD: true | |
| - name: Build VitePress | |
| run: npm run docs:build | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: docs/.vitepress/dist | |
| clean: true | |
| token: ${{ secrets.GITHUB_TOKEN }} |