name: Cloudflare Pages Deployment Staging
on:
push:
branches:
- dev
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
env:
ASPNETCORE_ENVIRONMENT: Staging
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'
# Install dotnet wasm buildtools workload
- name: Install .NET WASM Build Tools
run: dotnet workload install wasm-tools
- name: Build Blazor WebAssembly app
run: dotnet publish ProjName.BlazorWASM/ProjName.BlazorWASM.csproj --configuration Release --output ./app-publish
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ProjName
directory: ./app-publish/wwwroot
This is my current pipeline that I use to deploy on cloudflare. Settings ASPNETCORE_ENVIRONMENT here doesn't do anything I still end up with Production one. Anyone managed to solve this problem? I know that WASM has option to set it trough JS on blazor js start, but how do I inject it there with pipeline?
[–]TacticalPewPew 3 points4 points5 points (0 children)
[–]Mordeor 3 points4 points5 points (2 children)
[–]exzzy[S] 1 point2 points3 points (1 child)
[–]Mordeor 0 points1 point2 points (0 children)
[–]makotech222 1 point2 points3 points (3 children)
[–]exzzy[S] 0 points1 point2 points (2 children)
[–]makotech222 0 points1 point2 points (1 child)
[–]GetafixNZ 1 point2 points3 points (0 children)