Initial QuestionGraph library and documentation
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$projectPath = Split-Path $PSScriptRoot -Parent
|
||||
$archiveName = 'questiongraph-' + [guid]::NewGuid().ToString('N') + '.tar'
|
||||
$archivePath = Join-Path ([System.IO.Path]::GetTempPath()) $archiveName
|
||||
$remotePath = '/tmp/' + $archiveName
|
||||
|
||||
# Explicit inputs avoid uploading neighbouring repositories, secrets, or dependencies.
|
||||
tar -cf $archivePath -C $projectPath Dockerfile .dockerignore deploy src scripts tests package.json package-lock.json tsconfig.json vite.config.ts index.html README.md
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Could not create deployment archive.' }
|
||||
scp $archivePath "root@peterstockings.com:$remotePath"
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Could not upload deployment archive.' }
|
||||
ssh root@peterstockings.com "dokku git:from-archive questiongraph -- < $remotePath"
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Dokku deployment failed. Check the build output.' }
|
||||
Write-Output 'Deployed: https://questiongraph.peterstockings.com'
|
||||
Write-Output "Deployment archive retained locally at $archivePath and remotely at $remotePath"
|
||||
Reference in New Issue
Block a user