Skip to content

Add Tests for provided solutions #18

Add Tests for provided solutions

Add Tests for provided solutions #18

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / Publish learn.json-everything.net

Invalid workflow file

The workflow is not valid. .github/workflows/publish-site.yml (Line: 28, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.BRANCH == 'main'
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