stellaris-idle/.forgejo/workflows/build.yml
OpenClaw CI 672038d9d3
Some checks failed
Build & Test / build (push) Failing after 2s
Build & Test / publish (push) Has been skipped
Fix test project reference, add .gitignore, fix workflow (remove checkout step)
2026-06-07 20:07:12 +00:00

39 lines
1.1 KiB
YAML

name: Build & Test
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet/sdk:10.0
steps:
# No checkout needed — Forgejo Actions auto-clones the repo
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --configuration Release --verbosity normal
publish:
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet/sdk:10.0
steps:
- name: Publish Blazor WASM
run: dotnet publish -c Release -o /tmp/publish
- name: Deploy to hosting
run: |
echo "Deploying StellarisIdle Blazor WASM to /srv/web/stellaris.holoshaii.dev/"
mkdir -p /srv/web/stellaris.holoshaii.dev
cp -r /tmp/publish/wwwroot/* /srv/web/stellaris.holoshaii.dev/
# Only works if runner runs on same host as web server
# For remote deploy, use rsync/scp instead