-
Notifications
You must be signed in to change notification settings - Fork 25
43 lines (40 loc) · 1.12 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI
on:
push:
env:
DOTNET_NOLOGO: 1
Configuration: Release
PagesCname: www.phalanx.tools
defaults:
run:
shell: pwsh
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
- run: dotnet --info
- run: dotnet tool restore
- run: dotnet restore
- run: dotnet build --no-restore
- run: dotnet test --no-build
- run: dotnet format --no-restore --verify-no-changes --verbosity normal
deploy_main:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
- run: dotnet --info
- run: dotnet tool restore
- name: Publish
run: dotnet publish src/Phalanx.App --output ./.build/pub -p:GHPages=true -p:GHPagesBase=https://${{ env.PagesCname }}
- name: Push gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.build/pub/wwwroot
cname: ${{ env.PagesCname }}
force_orphan: true