Closed dochoffiday closed 2 years ago
Not sure if you still have this issue or not but I just set this Action up personally:
jobs:
build:
name: Deploy
runs-on: ubuntu-latest
...
- name: .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- run: dotnet run -- deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
and it works just fine, even with .NET 5. Hope this helps.
@withinfocus I tried that, which didn't build (because I'm running version 3.1 🤦♂️), so I also tried dotnet-version: '3.1.x'
, but I still had the same issue.
So I'm not sure what's going on, but running with windows-latest
still works so I guess I'll just keep it as that for now. 🤷♂️ It was worth a shot, thanks!
I had the same issue.
It appears to be a problem with the ubuntu version not being able to find _Layout.cshtml with a capital L. When I renamed _Layout.cshtml to _layout.cshtml and also specified layout: _layout in my front matter is suddenly started working correctly for me in all my pages.
I'm not sure why just renaming it didn't work but I had to do both to get it to work.
It's probably the internal Razor engine - it has it's own layout file handling logic and gets picky about things like casing. All of that is private or internal so I can't touch it or override it (for the most part). It also wouldn't surprise me if it changed a bit from one version of Razor to another.
It's probably the internal Razor engine - it has its own layout file handling logic and gets picky about things like casing. All of that is private or internal, so I can't touch it or override it (for the most part). It also wouldn't surprise me if it changed a bit from one version of Razor to another.
I think the best we can do is make a note of that in the documentation somewhere. At least for me, I quick technical note on https://statiq.dev/web/deployment/github-pages mentioning that if you use a non-windows container, you may need to check casing and set the layout file in the front matter explicitly would have saved me a lot of time.
Doing a little cleanup. Since there's a corresponding issue for documentation, I'm going to go ahead and close this one.
In the workflow
yml
file, theruns-on
property needs to be set towindows-latest
.I tried using
ubuntu-latest
(which is the default set when creating a new action), but my pages either weren't respecting the_viewstart
or the_layout
, because the layout wasn't being applied.I'm not sure if this is a
bug
or just something that needs to be specified in the documentation.