deploy
This commit is contained in:
		
							
								
								
									
										22
									
								
								deploy.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								deploy.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					#!/usr/bin/env sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# abort on errors
 | 
				
			||||||
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# build
 | 
				
			||||||
 | 
					npm run build:prod
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# navigate into the build output directory
 | 
				
			||||||
 | 
					cd dist
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# if you are deploying to a custom domain
 | 
				
			||||||
 | 
					# echo 'www.example.com' > CNAME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					git init
 | 
				
			||||||
 | 
					git add -A
 | 
				
			||||||
 | 
					git commit -m 'deploy'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# if you are deploying to https://<USERNAME>.github.io/<REPO>
 | 
				
			||||||
 | 
					git push -f git@github.com:PanJiaChen/vue-element-admin.git master:gh-pages
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd -
 | 
				
			||||||
@@ -10,7 +10,8 @@
 | 
				
			|||||||
    "build:sit": "cross-env NODE_ENV=production env_config=sit node build/build.js",
 | 
					    "build:sit": "cross-env NODE_ENV=production env_config=sit node build/build.js",
 | 
				
			||||||
    "lint": "eslint --ext .js,.vue src",
 | 
					    "lint": "eslint --ext .js,.vue src",
 | 
				
			||||||
    "test": "npm run lint",
 | 
					    "test": "npm run lint",
 | 
				
			||||||
    "precommit": "lint-staged"
 | 
					    "precommit": "lint-staged",
 | 
				
			||||||
 | 
					    "deploy": "bash deploy.sh"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "lint-staged": {
 | 
					  "lint-staged": {
 | 
				
			||||||
    "src/**/*.{js,vue}": [
 | 
					    "src/**/*.{js,vue}": [
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user