feat: update vite to v4 #41
Workflow file for this run
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: Publish Docs Deploy | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v*.* | |
jobs: | |
deploy-docs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install pnpm | |
id: pnpm-install | |
uses: pnpm/action-setup@v2.2.2 | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build website | |
run: pnpm build | |
env: | |
VITE_IS_VERCEL: true | |
NODE_ENV: production | |
# - name: Deploy | |
# uses: JamesIves/github-pages-deploy-action@v4.3.3 | |
# with: | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# branch: gh-pages | |
# folder: dist | |
# git-config-name: yugasun | |
# git-config-email: yuga_sun@163.com | |
# commit-message: website deploy | |
# - name: Deploy | |
# uses: amondnet/vercel-action@v20 | |
# with: | |
# vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required | |
# github-token: ${{ secrets.GITHUB_TOKEN }} #Optional | |
# vercel-org-id: yugasun | |
# vercel-project-id: vue-template |