mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-31 19:42:07 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			80 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			80 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: Deploy V4 Site
 | |
| 
 | |
| on:
 | |
|   push:
 | |
|     branches: [main]
 | |
|     paths:
 | |
|       - 'packages/vant/docs/**'
 | |
| 
 | |
|   workflow_dispatch:
 | |
| 
 | |
| jobs:
 | |
|   build-and-deploy:
 | |
|     runs-on: ubuntu-latest
 | |
|     steps:
 | |
|       - name: Checkout 🛎️
 | |
|         uses: actions/checkout@v2
 | |
|         with:
 | |
|           ref: 'main'
 | |
| 
 | |
|       - name: Install pnpm
 | |
|         run: corepack enable
 | |
| 
 | |
|       - uses: actions/setup-node@v2
 | |
|         with:
 | |
|           node-version: '18'
 | |
|           cache: 'pnpm'
 | |
| 
 | |
|       - name: Install dependencies
 | |
|         run: pnpm install
 | |
| 
 | |
|       - name: Build Site
 | |
|         run: npm run build:site
 | |
| 
 | |
|       - name: Deploy for Gitee 🚀
 | |
|         uses: JamesIves/github-pages-deploy-action@v4.4.0
 | |
|         with:
 | |
|           branch: gh-pages
 | |
|           folder: packages/vant/site-dist
 | |
|           clean: true
 | |
|           clean-exclude: |
 | |
|             1.x/*
 | |
|             1.x/**/*
 | |
|             next/*
 | |
|             next/**/*
 | |
|             v1/*
 | |
|             v1/**/*
 | |
|             v2/*
 | |
|             v2/**/*
 | |
|             v3/*
 | |
|             v3/**/*
 | |
|             v4/*
 | |
|             v4/**/*
 | |
|             vant-use/*
 | |
|             vant-use/**/*
 | |
| 
 | |
|       - name: Deploy for GitHub 🚀
 | |
|         uses: JamesIves/github-pages-deploy-action@v4.4.0
 | |
|         with:
 | |
|           branch: main
 | |
|           folder: packages/vant/site-dist
 | |
|           token: ${{ secrets.VANT_UI_TOKEN }}
 | |
|           repository-name: vant-ui/vant-ui.github.io
 | |
|           target-folder: vant
 | |
|           clean: true
 | |
|           clean-exclude: |
 | |
|             1.x/*
 | |
|             1.x/**/*
 | |
|             next/*
 | |
|             next/**/*
 | |
|             v1/*
 | |
|             v1/**/*
 | |
|             v2/*
 | |
|             v2/**/*
 | |
|             v3/*
 | |
|             v3/**/*
 | |
|             v4/*
 | |
|             v4/**/*
 | |
|             vant-use/*
 | |
|             vant-use/**/*
 |