-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.37 KB
/
publish-site.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
name: Publish learn.json-everything.net
on:
push:
branches:
- main # Default release branch
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: restore submodules
run: git submodule update --init
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: |
dotnet restore LearnJsonEverything/LearnJsonEverything.csproj
dotnet restore LearnJsonEverything.Tests/LearnJsonEverything.Tests.csproj
- name: Pre-build solution
run: dotnet build LearnJsonEverything.sln -c Release --no-restore
- name: Test
run: dotnet test LearnJsonEverything.sln -c Release --no-restore
- name: Publish
run: dotnet publish LearnJsonEverything/LearnJsonEverything.csproj -c Release --no-restore -o bin
- name: Add .nojekyll file
run: touch bin/wwwroot/.nojekyll
- name: Copy index.html files
run: |
mkdir bin/wwwroot/json-schema/ && cp bin/wwwroot/index.html bin/wwwroot/json-schema/
- name: Publish
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: bin/wwwroot