Add Tests for provided solutions #18
Workflow file for this run
This file contains hidden or 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
name: Publish learn.json-everything.net | ||
on: | ||
push: | ||
branches: | ||
- main # Default release branch | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
test: | ||
name: Verify provided solutions | ||
runs-on: ubuntu-latest | ||
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 | ||
- name: Test | ||
run: dotnet test LearnJsonEverything.sln -c Release --no-restore | ||
publish: | ||
name: pack & publish | ||
runs-on: ubuntu-latest | ||
if: env.BRANCH == 'main' | ||
Check failure on line 28 in .github/workflows/publish-site.yml
|
||
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 | ||
- name: Pre-build solution | ||
run: dotnet build 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 |