Skip to content

gh page

gh page #1

name: Deploy GitHub Pages

Check failure on line 1 in .github/workflows/deploy-github-pages.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-github-pages.yml

Invalid workflow file

(Line: 23, Col: 24): Unrecognized named-value: 'runner'. Located at position 1 within expression: runner.temp, (Line: 25, Col: 17): Unrecognized named-value: 'runner'. Located at position 1 within expression: runner.temp
on:
push:
branches:
- main
release:
types:
- published
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: true
env:
APP_PROJECT: src/PrompterLive.App/PrompterLive.App.csproj
PAGES_ARTIFACT_ROOT: ${{ runner.temp }}/prompterlive-pages
PAGES_BASE_PATH: /${{ github.event.repository.name }}/
PUBLISH_ROOT: ${{ runner.temp }}/prompterlive-publish
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Publish standalone WASM app
run: >
dotnet publish
"$APP_PROJECT"
-c Release
-o "$PUBLISH_ROOT"
-p:PrompterLiveBuildNumber=${{ github.run_number }}
- name: Prepare GitHub Pages artifact
run: |
mkdir -p "$PAGES_ARTIFACT_ROOT"
cp -R "$PUBLISH_ROOT/wwwroot/." "$PAGES_ARTIFACT_ROOT/"
sed -i "s#<base href=\"/\" />#<base href=\"${PAGES_BASE_PATH}\" />#g" "$PAGES_ARTIFACT_ROOT/index.html"
cp "$PAGES_ARTIFACT_ROOT/index.html" "$PAGES_ARTIFACT_ROOT/404.html"
touch "$PAGES_ARTIFACT_ROOT/.nojekyll"
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.PAGES_ARTIFACT_ROOT }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4