mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	ci: add pages.yml
				
					
				
			This commit is contained in:
		
							parent
							
								
									cc7726e1c2
								
							
						
					
					
						commit
						d24f334a81
					
				
							
								
								
									
										42
									
								
								.github/workflows/pages.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								.github/workflows/pages.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,42 @@
 | 
			
		||||
name: Build and Deploy
 | 
			
		||||
permissions:
 | 
			
		||||
  contents: write
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - main
 | 
			
		||||
      
 | 
			
		||||
jobs:
 | 
			
		||||
  deploy:
 | 
			
		||||
    concurrency: ci-${{ github.ref }}
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout 🛎️
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
 | 
			
		||||
      - name: Install Node.js
 | 
			
		||||
        uses: actions/setup-node@v4
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 20
 | 
			
		||||
          registry-url: https://registry.npmjs.com/
 | 
			
		||||
 | 
			
		||||
      - uses: pnpm/action-setup@v3
 | 
			
		||||
        name: Install pnpm
 | 
			
		||||
        id: pnpm-install
 | 
			
		||||
        with:
 | 
			
		||||
          version: 8.6.10
 | 
			
		||||
          run_install: false
 | 
			
		||||
 | 
			
		||||
      - name: Deploy 🔧
 | 
			
		||||
        run: |
 | 
			
		||||
          pnpm install --no-frozen-lockfile
 | 
			
		||||
          sed -i "s#VITE_PUBLIC_PATH = /#VITE_PUBLIC_PATH = /vue-pure-admin/#g" $(pwd)/.env.production
 | 
			
		||||
          pnpm build
 | 
			
		||||
          cd dist
 | 
			
		||||
          touch README.md .nojekyll
 | 
			
		||||
 | 
			
		||||
      - name: Deploy 🚀
 | 
			
		||||
        uses: JamesIves/github-pages-deploy-action@v4
 | 
			
		||||
        with:
 | 
			
		||||
          folder: dist
 | 
			
		||||
          clean: true
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user