Initial import
This commit is contained in:
commit
ab891a315c
773 changed files with 257255 additions and 0 deletions
31
scripts/deploy-vps.ps1
Normal file
31
scripts/deploy-vps.ps1
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
param(
|
||||
[string]$Remote = "vps",
|
||||
[string]$Branch = ""
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function Step($message) {
|
||||
Write-Host ""
|
||||
Write-Host "==> $message" -ForegroundColor Cyan
|
||||
}
|
||||
|
||||
if (-not $Branch) {
|
||||
$Branch = (git branch --show-current).Trim()
|
||||
}
|
||||
|
||||
if (-not $Branch) {
|
||||
throw "Could not determine the current git branch. Pass -Branch explicitly."
|
||||
}
|
||||
|
||||
Step "Validating content"
|
||||
npm run validate:content
|
||||
|
||||
Step "Building project"
|
||||
npm run build
|
||||
|
||||
Step "Pushing $Branch to $Remote"
|
||||
git push $Remote $Branch
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Deploy push complete." -ForegroundColor Green
|
||||
Loading…
Add table
Add a link
Reference in a new issue