docs: add GitHub Pages repository README
Publish GitHub Pages output / publish (push) Successful in 47s
Publish GitHub Pages output / publish (push) Successful in 47s
This commit is contained in:
@@ -6,6 +6,7 @@ $ErrorActionPreference = 'Stop'
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$siteSource = Join-Path $projectRoot 'pages-dist'
|
||||
$readmeSource = Join-Path $projectRoot 'pages/README.md'
|
||||
$workflowSource = Join-Path $projectRoot 'pages/deploy.yml'
|
||||
$temporaryRoot = Join-Path ([System.IO.Path]::GetTempPath()) ("holodori-pages-{0}" -f [guid]::NewGuid().ToString('N'))
|
||||
$checkout = Join-Path $temporaryRoot 'repository'
|
||||
@@ -28,13 +29,14 @@ try {
|
||||
if (Test-Path -LiteralPath $oldSiteTarget) {
|
||||
Remove-Item -LiteralPath $oldSiteTarget -Recurse -Force
|
||||
}
|
||||
foreach ($generatedPath in @('assets', 'icons', 'index.html', 'README.txt', 'VERSION.txt', '.nojekyll')) {
|
||||
foreach ($generatedPath in @('assets', 'icons', 'index.html', 'README.md', 'README.txt', 'VERSION.txt', '.nojekyll')) {
|
||||
$target = Join-Path $resolvedCheckout $generatedPath
|
||||
if (Test-Path -LiteralPath $target) {
|
||||
Remove-Item -LiteralPath $target -Recurse -Force
|
||||
}
|
||||
}
|
||||
Copy-Item -Path (Join-Path $siteSource '*') -Destination $resolvedCheckout -Recurse -Force
|
||||
Copy-Item -LiteralPath $readmeSource -Destination (Join-Path $resolvedCheckout 'README.md') -Force
|
||||
New-Item -ItemType File -Path (Join-Path $resolvedCheckout '.nojekyll') -Force | Out-Null
|
||||
|
||||
$workflowTarget = Join-Path $resolvedCheckout '.github/workflows'
|
||||
|
||||
Reference in New Issue
Block a user