用codex 修网速 #110
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: Deploy | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20.18.1 | |
| # cache: npm | |
| - run: node -v | |
| - run: rm -rf node_modules package-lock.json pnpm-lock.yaml | |
| - run: npm cache clean --force | |
| - run: npm i | |
| # - run: npm i --legacy-peer-deps | |
| # - run: npm i pnpm -g | |
| # - run: npm install -g pnpm@latest | |
| # - run: pnpm i | |
| # - run: pnpm add markdown-it@13.0.2 | |
| # - run: pnpm approve-builds | |
| # - run: npm audit fix -f | |
| - name: Build | |
| run: npm run build | |
| - name: Deploy to GitHub Pages | |
| uses: crazy-max/ghaction-github-pages@v2 | |
| with: | |
| target_branch: gh-pages | |
| build_dir: docs/.vitepress/dist | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_HOME }} |