Skip to content

Commit

Permalink
override output paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Pxtl authored Nov 28, 2023
1 parent e8cfad3 commit bc7ea21
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$blogdir = ".\website"
$docdir = ".\doc\SnowSite"
$blogDir = (mkdir ".\website" -force).FullName
$docDir = ".\doc\SnowSite"
"Configuring git..."
pushd $docdir
pushd $docDir
$lastMessage = git log -1 --pretty=%B | Select-Object -First 1
$lastUserName = git log -1 --pretty=format:'%an' | Select-Object -First 1
$lastUserEamil = git log -1 --pretty=format:'%ae' | Select-Object -First 1
Expand All @@ -49,8 +49,15 @@ jobs:
git config --global core.autocrlf false
popd
"Overriding output dirs to $blogDir"
$configPath = $docDir\Snow\Snow.config.json
$config = Get-Content $configPath | ConvertFrom-Json
$config.postsOutput = $blogDir
$config.pagesOutput = $blogDir
$config | ConvertTo-Json | Out-File $configPath
"Running Snow..."
& Snow\Snow.exe "config=$docdir\Snow\Snow.config.json"
& Snow\Snow.exe "config=$configPath"
Write-Output "Updating $blogdir..."
cd $blogdir
Expand Down

0 comments on commit bc7ea21

Please sign in to comment.