-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Update GitHub Pages | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
pr-build: | ||
name: PR build | ||
runs-on: windows-2022 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Validate prettier | ||
run: ./runprettier.bat | ||
|
||
- name: Check for changes by prettier | ||
shell: pwsh | ||
run: ./Build/Uncommitted-changes.ps1 -tool runprettier.bat | ||
|
||
- name: Install CSharpier | ||
run: dotnet tool restore | ||
|
||
- name: Run CSharpier | ||
run: dotnet csharpier . | ||
|
||
- name: Check for changes by CSharpier | ||
shell: pwsh | ||
run: ./Build/Uncommitted-changes.ps1 -tool "dotnet csharpier ." | ||
|
||
- uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: ~/.nuget/packages | ||
key: ${{ runner.os }}-nuget-v2-${{ hashFiles('**/packages.lock.json') }} | ||
|
||
- name: Restore Solution | ||
run: msbuild -nodeReuse:false -maxCpuCount -target:Restore -property:Configuration="Release" Tql.sln | ||
|
||
- name: Build Solution | ||
run: msbuild -nodeReuse:false -maxCpuCount -target:Build -property:Configuration="Release" Tql.sln | ||
|
||
- name: Install DocFX | ||
run: dotnet tool update -g docfx | ||
|
||
- name: Run DocFX | ||
run: docfx Documentation/docfx.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
param($tool) | ||
|
||
$Changes = git status --porcelain | ||
|
||
if ("$Changes".Trim() -ne "") | ||
{ | ||
Write-Host "There are uncommitted changes. Run '$tool' and update your PR with any changes." | ||
exit 1 | ||
} |